bitkeeper revision 1.1389.23.3 (428bb14aaqCacqs5wXz_QRCElNk65A)
authoradsharma@linux-t08.sc.intel.com <adsharma@linux-t08.sc.intel.com>
Wed, 18 May 2005 21:19:06 +0000 (21:19 +0000)
committeradsharma@linux-t08.sc.intel.com <adsharma@linux-t08.sc.intel.com>
Wed, 18 May 2005 21:19:06 +0000 (21:19 +0000)
ptrace.h, pal.h, ia64regs.h, gcc_intrin.h, entry.h:
These CONFIG_VTI cp_patch files should have been checked in as patches.

.rootkeys
xen/arch/ia64/entry.h [deleted file]
xen/arch/ia64/patch/linux-2.6.11/entry.h [new file with mode: 0644]
xen/arch/ia64/patch/linux-2.6.11/gcc_intrin.h [new file with mode: 0644]
xen/arch/ia64/patch/linux-2.6.11/ia64regs.h [new file with mode: 0644]
xen/arch/ia64/patch/linux-2.6.11/pal.h [new file with mode: 0644]
xen/arch/ia64/patch/linux-2.6.11/ptrace.h [new file with mode: 0644]
xen/include/asm-ia64/gcc_intrin.h [deleted file]
xen/include/asm-ia64/ia64regs.h [deleted file]
xen/include/asm-ia64/pal.h [deleted file]
xen/include/asm-ia64/ptrace.h [deleted file]

index 0f4911f615b28c5a21efbe1f9c54ac35569e1f04..45a257978211a5f4c01a86b747bf1244f1a5ed11 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 421098b2PHgzf_Gg4R65YRNi_QzMKQ xen/arch/ia64/dom0_ops.c
 421098b2O7jsNfzQXA1v3rbAc1QhpA xen/arch/ia64/dom_fw.c
 421098b2ZlaBcyiuuPr3WpzaSDwg6Q xen/arch/ia64/domain.c
-428b9f38j9LG7X1Ask6iE6pWTTT2xw xen/arch/ia64/entry.h
 4239e98a_HX-FCIcXtVqY0BbrDqVug xen/arch/ia64/hypercall.c
 421098b3LYAS8xJkQiGP7tiTlyBt0Q xen/arch/ia64/idle0_task.c
 421098b3ys5GAr4z6_H1jD33oem82g xen/arch/ia64/irq.c
 425ae516maKAsHBJVSzs19cdRgt3Nw xen/arch/ia64/patch/linux-2.6.11/cpumask.h
 425ae516cGqvMzGtihTEsQXAXsuOhQ xen/arch/ia64/patch/linux-2.6.11/efi.c
 425ae516Y1A4q4_Kfre3qnDj7lbHJg xen/arch/ia64/patch/linux-2.6.11/entry.S
+428bb037eJ4qs48I-tUdhht5_95obA xen/arch/ia64/patch/linux-2.6.11/entry.h
+428bb037jPbybWNkNymaqkFr83vT6Q xen/arch/ia64/patch/linux-2.6.11/gcc_intrin.h
 425ae516txAP-owjzpTJ7ThfzWR8nw xen/arch/ia64/patch/linux-2.6.11/hardirq.h
 425ae516PDO1ESDHXHVeDNvlqUfmdQ xen/arch/ia64/patch/linux-2.6.11/head.S
 425ae516JR7HWvt1zxJ-wLvEWmJGgg xen/arch/ia64/patch/linux-2.6.11/hpsim_ssc.h
+428bb037UxfxIhZaslk-qHazO4w0yg xen/arch/ia64/patch/linux-2.6.11/ia64regs.h
 425ae516AHRNmaVuZjJY-9YjmKRDqg xen/arch/ia64/patch/linux-2.6.11/interrupt.h
 425ae516U2wFUzrUJQUpy3z38jZHsQ xen/arch/ia64/patch/linux-2.6.11/io.h
 425ae516GGRmXijPBLC5ii6yWOn0rg xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c
 425ae516N7SaORdbodDr90tmtCzYXw xen/arch/ia64/patch/linux-2.6.11/mm_contig.c
 425ae516WDLrfEA4zr40d00z0VIWPg xen/arch/ia64/patch/linux-2.6.11/page.h
 425ae516pVQ75NhdItT593SiWI0lbQ xen/arch/ia64/patch/linux-2.6.11/pal.S
+428bb037THuiyhERFP8RhRgapNkWXg xen/arch/ia64/patch/linux-2.6.11/pal.h
 425ae516QfmjiF_a-mabAXqV8Imzkg xen/arch/ia64/patch/linux-2.6.11/pgalloc.h
 425ae516EWaNOBEnc1xnphTbRmNZsw xen/arch/ia64/patch/linux-2.6.11/processor.h
+428bb037KSxe7_UyqseK5bWhGe3KwA xen/arch/ia64/patch/linux-2.6.11/ptrace.h
 425ae516LecDyXlwh3NLBtHZKXmMcA xen/arch/ia64/patch/linux-2.6.11/series
 425ae516RFiPn2CGkpJ21LM-1lJcQg xen/arch/ia64/patch/linux-2.6.11/setup.c
 425ae516FX_10YaKGMU8Ysf7kkdm_A xen/arch/ia64/patch/linux-2.6.11/swiotlb.c
 421098b6Nn0I7hGB8Mkd1Cis0KMkhA xen/include/asm-ia64/domain.h
 4241e879ry316Y_teC18DuK7mGKaQw xen/include/asm-ia64/domain_page.h
 4241e880hAyo_dk0PPDYj3LsMIvf-Q xen/include/asm-ia64/flushtlb.h
-428b9f38zjEw15Jew-3EoMb_9H0cSQ xen/include/asm-ia64/gcc_intrin.h
 421098b6X3Fs2yht42TE2ufgKqt2Fw xen/include/asm-ia64/ia64_int.h
-428b9f38-opAgufQ4qbh8V176C3-3w xen/include/asm-ia64/ia64regs.h
 421098b7psFAn8kbeR-vcRCdc860Vw xen/include/asm-ia64/init.h
 421098b7XC1A5PhA-lrU9pIO3sSSmA xen/include/asm-ia64/mm.h
 421098b7c0Dx0ABuW_yHQdAqKhUoiQ xen/include/asm-ia64/mmu_context.h
 421098b7C2dr3O7lgc_oeC9TEE9GKw xen/include/asm-ia64/multicall.h
 421098b7dX_56NCV9zjftqm1yIqC8w xen/include/asm-ia64/offsets.h
-428b9f38Z3b5V7I8eOE0i3lN0DNg3Q xen/include/asm-ia64/pal.h
 421098b72bPUyviWloEAIB85dGCm2Q xen/include/asm-ia64/privop.h
-428b9f38_TmnCXJN3CN6wKMdpHy4Yg xen/include/asm-ia64/ptrace.h
 421098b7Z6OwjZnrTZkh34DoDfcjrA xen/include/asm-ia64/regionreg.h
 421098b707cY5YluUcWK5Pc-71ETVw xen/include/asm-ia64/regs.h
 4214e2f3fbO_n9Z1kIcBR83d7W4OJw xen/include/asm-ia64/serial.h
diff --git a/xen/arch/ia64/entry.h b/xen/arch/ia64/entry.h
deleted file mode 100644 (file)
index 0aa2d0a..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#include <linux/config.h>
-
-/*
- * Preserved registers that are shared between code in ivt.S and
- * entry.S.  Be careful not to step on these!
- */
-#define PRED_LEAVE_SYSCALL     1 /* TRUE iff leave from syscall */
-#define PRED_KERNEL_STACK      2 /* returning to kernel-stacks? */
-#define PRED_USER_STACK                3 /* returning to user-stacks? */
-#ifdef CONFIG_VTI
-#define PRED_EMUL              2 /* Need to save r4-r7 for inst emulation */
-#define PRED_NON_EMUL          3 /* No need to save r4-r7 for normal path */
-#define PRED_BN0               6 /* Guest is in bank 0 */
-#define PRED_BN1               7 /* Guest is in bank 1 */
-#endif // CONFIG_VTI
-#define PRED_SYSCALL           4 /* inside a system call? */
-#define PRED_NON_SYSCALL       5 /* complement of PRED_SYSCALL */
-
-#ifdef __ASSEMBLY__
-# define PASTE2(x,y)   x##y
-# define PASTE(x,y)    PASTE2(x,y)
-
-# define pLvSys                PASTE(p,PRED_LEAVE_SYSCALL)
-# define pKStk         PASTE(p,PRED_KERNEL_STACK)
-# define pUStk         PASTE(p,PRED_USER_STACK)
-#ifdef CONFIG_VTI
-# define pEml          PASTE(p,PRED_EMUL)
-# define pNonEml       PASTE(p,PRED_NON_EMUL)
-# define pBN0          PASTE(p,PRED_BN0)
-# define pBN1          PASTE(p,PRED_BN1)
-#endif // CONFIG_VTI
-# define pSys          PASTE(p,PRED_SYSCALL)
-# define pNonSys       PASTE(p,PRED_NON_SYSCALL)
-#endif
-
-#define PT(f)          (IA64_PT_REGS_##f##_OFFSET)
-#define SW(f)          (IA64_SWITCH_STACK_##f##_OFFSET)
-#ifdef CONFIG_VTI
-#define VPD(f)      (VPD_##f##_START_OFFSET)
-#endif // CONFIG_VTI
-
-#define PT_REGS_SAVES(off)                     \
-       .unwabi 3, 'i';                         \
-       .fframe IA64_PT_REGS_SIZE+16+(off);     \
-       .spillsp rp, PT(CR_IIP)+16+(off);       \
-       .spillsp ar.pfs, PT(CR_IFS)+16+(off);   \
-       .spillsp ar.unat, PT(AR_UNAT)+16+(off); \
-       .spillsp ar.fpsr, PT(AR_FPSR)+16+(off); \
-       .spillsp pr, PT(PR)+16+(off);
-
-#define PT_REGS_UNWIND_INFO(off)               \
-       .prologue;                              \
-       PT_REGS_SAVES(off);                     \
-       .body
-
-#define SWITCH_STACK_SAVES(off)                                                        \
-       .savesp ar.unat,SW(CALLER_UNAT)+16+(off);                               \
-       .savesp ar.fpsr,SW(AR_FPSR)+16+(off);                                   \
-       .spillsp f2,SW(F2)+16+(off); .spillsp f3,SW(F3)+16+(off);               \
-       .spillsp f4,SW(F4)+16+(off); .spillsp f5,SW(F5)+16+(off);               \
-       .spillsp f16,SW(F16)+16+(off); .spillsp f17,SW(F17)+16+(off);           \
-       .spillsp f18,SW(F18)+16+(off); .spillsp f19,SW(F19)+16+(off);           \
-       .spillsp f20,SW(F20)+16+(off); .spillsp f21,SW(F21)+16+(off);           \
-       .spillsp f22,SW(F22)+16+(off); .spillsp f23,SW(F23)+16+(off);           \
-       .spillsp f24,SW(F24)+16+(off); .spillsp f25,SW(F25)+16+(off);           \
-       .spillsp f26,SW(F26)+16+(off); .spillsp f27,SW(F27)+16+(off);           \
-       .spillsp f28,SW(F28)+16+(off); .spillsp f29,SW(F29)+16+(off);           \
-       .spillsp f30,SW(F30)+16+(off); .spillsp f31,SW(F31)+16+(off);           \
-       .spillsp r4,SW(R4)+16+(off); .spillsp r5,SW(R5)+16+(off);               \
-       .spillsp r6,SW(R6)+16+(off); .spillsp r7,SW(R7)+16+(off);               \
-       .spillsp b0,SW(B0)+16+(off); .spillsp b1,SW(B1)+16+(off);               \
-       .spillsp b2,SW(B2)+16+(off); .spillsp b3,SW(B3)+16+(off);               \
-       .spillsp b4,SW(B4)+16+(off); .spillsp b5,SW(B5)+16+(off);               \
-       .spillsp ar.pfs,SW(AR_PFS)+16+(off); .spillsp ar.lc,SW(AR_LC)+16+(off); \
-       .spillsp @priunat,SW(AR_UNAT)+16+(off);                                 \
-       .spillsp ar.rnat,SW(AR_RNAT)+16+(off);                                  \
-       .spillsp ar.bspstore,SW(AR_BSPSTORE)+16+(off);                          \
-       .spillsp pr,SW(PR)+16+(off))
-
-#define DO_SAVE_SWITCH_STACK                   \
-       movl r28=1f;                            \
-       ;;                                      \
-       .fframe IA64_SWITCH_STACK_SIZE;         \
-       adds sp=-IA64_SWITCH_STACK_SIZE,sp;     \
-       mov.ret.sptk b7=r28,1f;                 \
-       SWITCH_STACK_SAVES(0);                  \
-       br.cond.sptk.many save_switch_stack;    \
-1:
-
-#define DO_LOAD_SWITCH_STACK                   \
-       movl r28=1f;                            \
-       ;;                                      \
-       invala;                                 \
-       mov.ret.sptk b7=r28,1f;                 \
-       br.cond.sptk.many load_switch_stack;    \
-1:     .restore sp;                            \
-       adds sp=IA64_SWITCH_STACK_SIZE,sp
diff --git a/xen/arch/ia64/patch/linux-2.6.11/entry.h b/xen/arch/ia64/patch/linux-2.6.11/entry.h
new file mode 100644 (file)
index 0000000..8ccad88
--- /dev/null
@@ -0,0 +1,37 @@
+--- /home/adsharma/disk2/xen-ia64/test3.bk/xen/../../linux-2.6.11/arch/ia64/kernel/entry.h     2005-03-01 23:38:07.000000000 -0800
++++ /home/adsharma/disk2/xen-ia64/test3.bk/xen/arch/ia64/entry.h       2005-05-18 14:00:53.000000000 -0700
+@@ -7,6 +7,12 @@
+ #define PRED_LEAVE_SYSCALL    1 /* TRUE iff leave from syscall */
+ #define PRED_KERNEL_STACK     2 /* returning to kernel-stacks? */
+ #define PRED_USER_STACK               3 /* returning to user-stacks? */
++#ifdef CONFIG_VTI
++#define PRED_EMUL             2 /* Need to save r4-r7 for inst emulation */
++#define PRED_NON_EMUL         3 /* No need to save r4-r7 for normal path */
++#define PRED_BN0              6 /* Guest is in bank 0 */
++#define PRED_BN1              7 /* Guest is in bank 1 */
++#endif // CONFIG_VTI
+ #define PRED_SYSCALL          4 /* inside a system call? */
+ #define PRED_NON_SYSCALL      5 /* complement of PRED_SYSCALL */
+@@ -17,12 +23,21 @@
+ # define pLvSys               PASTE(p,PRED_LEAVE_SYSCALL)
+ # define pKStk                PASTE(p,PRED_KERNEL_STACK)
+ # define pUStk                PASTE(p,PRED_USER_STACK)
++#ifdef CONFIG_VTI
++# define pEml         PASTE(p,PRED_EMUL)
++# define pNonEml      PASTE(p,PRED_NON_EMUL)
++# define pBN0         PASTE(p,PRED_BN0)
++# define pBN1         PASTE(p,PRED_BN1)
++#endif // CONFIG_VTI
+ # define pSys         PASTE(p,PRED_SYSCALL)
+ # define pNonSys      PASTE(p,PRED_NON_SYSCALL)
+ #endif
+ #define PT(f)         (IA64_PT_REGS_##f##_OFFSET)
+ #define SW(f)         (IA64_SWITCH_STACK_##f##_OFFSET)
++#ifdef CONFIG_VTI
++#define VPD(f)      (VPD_##f##_START_OFFSET)
++#endif // CONFIG_VTI
+ #define PT_REGS_SAVES(off)                    \
+       .unwabi 3, 'i';                         \
diff --git a/xen/arch/ia64/patch/linux-2.6.11/gcc_intrin.h b/xen/arch/ia64/patch/linux-2.6.11/gcc_intrin.h
new file mode 100644 (file)
index 0000000..e2966b8
--- /dev/null
@@ -0,0 +1,69 @@
+--- /home/adsharma/disk2/xen-ia64/test3.bk/xen/../../linux-2.6.11/include/asm-ia64/gcc_intrin.h        2005-03-01 23:38:08.000000000 -0800
++++ /home/adsharma/disk2/xen-ia64/test3.bk/xen/include/asm-ia64/gcc_intrin.h   2005-05-18 14:00:53.000000000 -0700
+@@ -368,6 +368,66 @@
+ #define ia64_mf()     asm volatile ("mf" ::: "memory")
+ #define ia64_mfa()    asm volatile ("mf.a" ::: "memory")
++#ifdef CONFIG_VTI
++/*
++ * Flushrs instruction stream.
++ */
++#define ia64_flushrs() asm volatile ("flushrs;;":::"memory")
++
++#define ia64_loadrs() asm volatile ("loadrs;;":::"memory")
++
++#define ia64_get_rsc()                          \
++({                                  \
++    unsigned long val;                     \
++    asm volatile ("mov %0=ar.rsc;;" : "=r"(val) :: "memory");  \
++    val;                               \
++})
++
++#define ia64_set_rsc(val)                       \
++    asm volatile ("mov ar.rsc=%0;;" :: "r"(val) : "memory")
++
++#define ia64_get_bspstore()     \
++({                                  \
++    unsigned long val;                     \
++    asm volatile ("mov %0=ar.bspstore;;" : "=r"(val) :: "memory");  \
++    val;                               \
++})
++
++#define ia64_set_bspstore(val)                       \
++    asm volatile ("mov ar.bspstore=%0;;" :: "r"(val) : "memory")
++
++#define ia64_get_rnat()     \
++({                                  \
++    unsigned long val;                     \
++    asm volatile ("mov %0=ar.rnat;" : "=r"(val) :: "memory");  \
++    val;                               \
++})
++
++#define ia64_set_rnat(val)                       \
++    asm volatile ("mov ar.rnat=%0;;" :: "r"(val) : "memory")
++
++#define ia64_ttag(addr)                                                       \
++({                                                                            \
++      __u64 ia64_intri_res;                                                   \
++      asm volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr));        \
++      ia64_intri_res;                                                         \
++})
++
++#define ia64_get_dcr()                          \
++({                                      \
++    __u64 result;                               \
++    asm volatile ("mov %0=cr.dcr" : "=r"(result) : );           \
++    result;                                 \
++})
++
++#define ia64_set_dcr(val)                           \
++({                                      \
++    asm volatile ("mov cr.dcr=%0" :: "r"(val) );            \
++})
++
++#endif // CONFIG_VTI
++
++
+ #define ia64_invala() asm volatile ("invala" ::: "memory")
+ #define ia64_thash(addr)                                                      \
diff --git a/xen/arch/ia64/patch/linux-2.6.11/ia64regs.h b/xen/arch/ia64/patch/linux-2.6.11/ia64regs.h
new file mode 100644 (file)
index 0000000..6efd973
--- /dev/null
@@ -0,0 +1,38 @@
+--- /home/adsharma/disk2/xen-ia64/test3.bk/xen/../../linux-2.6.11/include/asm-ia64/ia64regs.h  2005-03-01 23:38:07.000000000 -0800
++++ /home/adsharma/disk2/xen-ia64/test3.bk/xen/include/asm-ia64/ia64regs.h     2005-05-18 14:00:53.000000000 -0700
+@@ -87,6 +87,35 @@
+ #define _IA64_REG_CR_LRR0     4176
+ #define _IA64_REG_CR_LRR1     4177
++#ifdef  CONFIG_VTI
++#define IA64_REG_CR_DCR   0
++#define IA64_REG_CR_ITM   1
++#define IA64_REG_CR_IVA   2
++#define IA64_REG_CR_PTA   8
++#define IA64_REG_CR_IPSR  16
++#define IA64_REG_CR_ISR   17
++#define IA64_REG_CR_IIP   19
++#define IA64_REG_CR_IFA   20
++#define IA64_REG_CR_ITIR  21
++#define IA64_REG_CR_IIPA  22
++#define IA64_REG_CR_IFS   23
++#define IA64_REG_CR_IIM   24
++#define IA64_REG_CR_IHA   25
++#define IA64_REG_CR_LID   64
++#define IA64_REG_CR_IVR   65
++#define IA64_REG_CR_TPR   66
++#define IA64_REG_CR_EOI   67
++#define IA64_REG_CR_IRR0  68
++#define IA64_REG_CR_IRR1  69
++#define IA64_REG_CR_IRR2  70
++#define IA64_REG_CR_IRR3  71
++#define IA64_REG_CR_ITV   72
++#define IA64_REG_CR_PMV   73
++#define IA64_REG_CR_CMCV  74
++#define IA64_REG_CR_LRR0  80
++#define IA64_REG_CR_LRR1  81
++#endif  //  CONFIG_VTI
++
+ /* Indirect Registers for getindreg() and setindreg() */
+ #define _IA64_REG_INDR_CPUID  9000    /* getindreg only */
diff --git a/xen/arch/ia64/patch/linux-2.6.11/pal.h b/xen/arch/ia64/patch/linux-2.6.11/pal.h
new file mode 100644 (file)
index 0000000..40da4e2
--- /dev/null
@@ -0,0 +1,12 @@
+--- /home/adsharma/disk2/xen-ia64/test3.bk/xen/../../linux-2.6.11/include/asm-ia64/pal.h       2005-03-01 23:38:13.000000000 -0800
++++ /home/adsharma/disk2/xen-ia64/test3.bk/xen/include/asm-ia64/pal.h  2005-05-18 14:00:53.000000000 -0700
+@@ -1559,6 +1559,9 @@
+       return iprv.status;
+ }
++#ifdef CONFIG_VTI
++#include <asm/vmx_pal.h>
++#endif // CONFIG_VTI
+ #endif /* __ASSEMBLY__ */
+ #endif /* _ASM_IA64_PAL_H */
diff --git a/xen/arch/ia64/patch/linux-2.6.11/ptrace.h b/xen/arch/ia64/patch/linux-2.6.11/ptrace.h
new file mode 100644 (file)
index 0000000..dd79914
--- /dev/null
@@ -0,0 +1,20 @@
+--- /home/adsharma/disk2/xen-ia64/test3.bk/xen/../../linux-2.6.11/include/asm-ia64/ptrace.h    2005-03-01 23:38:38.000000000 -0800
++++ /home/adsharma/disk2/xen-ia64/test3.bk/xen/include/asm-ia64/ptrace.h       2005-05-18 14:00:53.000000000 -0700
+@@ -95,6 +95,9 @@
+  * (because the memory stack pointer MUST ALWAYS be aligned this way)
+  *
+  */
++#ifdef CONFIG_VTI
++#include "vmx_ptrace.h"
++#else  //CONFIG_VTI
+ struct pt_regs {
+       /* The following registers are saved by SAVE_MIN: */
+       unsigned long b6;               /* scratch */
+@@ -170,6 +173,7 @@
+       struct ia64_fpreg f10;          /* scratch */
+       struct ia64_fpreg f11;          /* scratch */
+ };
++#endif // CONFIG_VTI
+ /*
+  * This structure contains the addition registers that need to
diff --git a/xen/include/asm-ia64/gcc_intrin.h b/xen/include/asm-ia64/gcc_intrin.h
deleted file mode 100644 (file)
index a87d858..0000000
+++ /dev/null
@@ -1,657 +0,0 @@
-#ifndef _ASM_IA64_GCC_INTRIN_H
-#define _ASM_IA64_GCC_INTRIN_H
-/*
- *
- * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com>
- * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com>
- */
-
-#include <linux/compiler.h>
-
-/* define this macro to get some asm stmts included in 'c' files */
-#define ASM_SUPPORTED
-
-/* Optimization barrier */
-/* The "volatile" is due to gcc bugs */
-#define ia64_barrier() asm volatile ("":::"memory")
-
-#define ia64_stop()    asm volatile (";;"::)
-
-#define ia64_invala_gr(regnum) asm volatile ("invala.e r%0" :: "i"(regnum))
-
-#define ia64_invala_fr(regnum) asm volatile ("invala.e f%0" :: "i"(regnum))
-
-extern void ia64_bad_param_for_setreg (void);
-extern void ia64_bad_param_for_getreg (void);
-
-register unsigned long ia64_r13 asm ("r13") __attribute_used__;
-
-#define ia64_setreg(regnum, val)                                               \
-({                                                                             \
-       switch (regnum) {                                                       \
-           case _IA64_REG_PSR_L:                                               \
-                   asm volatile ("mov psr.l=%0" :: "r"(val) : "memory");       \
-                   break;                                                      \
-           case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC:                          \
-                   asm volatile ("mov ar%0=%1" ::                              \
-                                         "i" (regnum - _IA64_REG_AR_KR0),      \
-                                         "r"(val): "memory");                  \
-                   break;                                                      \
-           case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1:                        \
-                   asm volatile ("mov cr%0=%1" ::                              \
-                                         "i" (regnum - _IA64_REG_CR_DCR),      \
-                                         "r"(val): "memory" );                 \
-                   break;                                                      \
-           case _IA64_REG_SP:                                                  \
-                   asm volatile ("mov r12=%0" ::                               \
-                                         "r"(val): "memory");                  \
-                   break;                                                      \
-           case _IA64_REG_GP:                                                  \
-                   asm volatile ("mov gp=%0" :: "r"(val) : "memory");          \
-               break;                                                          \
-           default:                                                            \
-                   ia64_bad_param_for_setreg();                                \
-                   break;                                                      \
-       }                                                                       \
-})
-
-#define ia64_getreg(regnum)                                                    \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-                                                                               \
-       switch (regnum) {                                                       \
-       case _IA64_REG_GP:                                                      \
-               asm volatile ("mov %0=gp" : "=r"(ia64_intri_res));              \
-               break;                                                          \
-       case _IA64_REG_IP:                                                      \
-               asm volatile ("mov %0=ip" : "=r"(ia64_intri_res));              \
-               break;                                                          \
-       case _IA64_REG_PSR:                                                     \
-               asm volatile ("mov %0=psr" : "=r"(ia64_intri_res));             \
-               break;                                                          \
-       case _IA64_REG_TP:      /* for current() */                             \
-               ia64_intri_res = ia64_r13;                                      \
-               break;                                                          \
-       case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC:                              \
-               asm volatile ("mov %0=ar%1" : "=r" (ia64_intri_res)             \
-                                     : "i"(regnum - _IA64_REG_AR_KR0));        \
-               break;                                                          \
-       case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1:                            \
-               asm volatile ("mov %0=cr%1" : "=r" (ia64_intri_res)             \
-                                     : "i" (regnum - _IA64_REG_CR_DCR));       \
-               break;                                                          \
-       case _IA64_REG_SP:                                                      \
-               asm volatile ("mov %0=sp" : "=r" (ia64_intri_res));             \
-               break;                                                          \
-       default:                                                                \
-               ia64_bad_param_for_getreg();                                    \
-               break;                                                          \
-       }                                                                       \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_hint_pause 0
-
-#define ia64_hint(mode)                                                \
-({                                                             \
-       switch (mode) {                                         \
-       case ia64_hint_pause:                                   \
-               asm volatile ("hint @pause" ::: "memory");      \
-               break;                                          \
-       }                                                       \
-})
-
-
-/* Integer values for mux1 instruction */
-#define ia64_mux1_brcst 0
-#define ia64_mux1_mix   8
-#define ia64_mux1_shuf  9
-#define ia64_mux1_alt  10
-#define ia64_mux1_rev  11
-
-#define ia64_mux1(x, mode)                                                     \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-                                                                               \
-       switch (mode) {                                                         \
-       case ia64_mux1_brcst:                                                   \
-               asm ("mux1 %0=%1,@brcst" : "=r" (ia64_intri_res) : "r" (x));    \
-               break;                                                          \
-       case ia64_mux1_mix:                                                     \
-               asm ("mux1 %0=%1,@mix" : "=r" (ia64_intri_res) : "r" (x));      \
-               break;                                                          \
-       case ia64_mux1_shuf:                                                    \
-               asm ("mux1 %0=%1,@shuf" : "=r" (ia64_intri_res) : "r" (x));     \
-               break;                                                          \
-       case ia64_mux1_alt:                                                     \
-               asm ("mux1 %0=%1,@alt" : "=r" (ia64_intri_res) : "r" (x));      \
-               break;                                                          \
-       case ia64_mux1_rev:                                                     \
-               asm ("mux1 %0=%1,@rev" : "=r" (ia64_intri_res) : "r" (x));      \
-               break;                                                          \
-       }                                                                       \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_popcnt(x)                                         \
-({                                                             \
-       __u64 ia64_intri_res;                                   \
-       asm ("popcnt %0=%1" : "=r" (ia64_intri_res) : "r" (x)); \
-                                                               \
-       ia64_intri_res;                                         \
-})
-
-#define ia64_getf_exp(x)                                       \
-({                                                             \
-       long ia64_intri_res;                                    \
-                                                               \
-       asm ("getf.exp %0=%1" : "=r"(ia64_intri_res) : "f"(x)); \
-                                                               \
-       ia64_intri_res;                                         \
-})
-
-#define ia64_shrp(a, b, count)                                                         \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm ("shrp %0=%1,%2,%3" : "=r"(ia64_intri_res) : "r"(a), "r"(b), "i"(count));   \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_ldfs(regnum, x)                                   \
-({                                                             \
-       register double __f__ asm ("f"#regnum);                 \
-       asm volatile ("ldfs %0=[%1]" :"=f"(__f__): "r"(x));     \
-})
-
-#define ia64_ldfd(regnum, x)                                   \
-({                                                             \
-       register double __f__ asm ("f"#regnum);                 \
-       asm volatile ("ldfd %0=[%1]" :"=f"(__f__): "r"(x));     \
-})
-
-#define ia64_ldfe(regnum, x)                                   \
-({                                                             \
-       register double __f__ asm ("f"#regnum);                 \
-       asm volatile ("ldfe %0=[%1]" :"=f"(__f__): "r"(x));     \
-})
-
-#define ia64_ldf8(regnum, x)                                   \
-({                                                             \
-       register double __f__ asm ("f"#regnum);                 \
-       asm volatile ("ldf8 %0=[%1]" :"=f"(__f__): "r"(x));     \
-})
-
-#define ia64_ldf_fill(regnum, x)                               \
-({                                                             \
-       register double __f__ asm ("f"#regnum);                 \
-       asm volatile ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \
-})
-
-#define ia64_stfs(x, regnum)                                           \
-({                                                                     \
-       register double __f__ asm ("f"#regnum);                         \
-       asm volatile ("stfs [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \
-})
-
-#define ia64_stfd(x, regnum)                                           \
-({                                                                     \
-       register double __f__ asm ("f"#regnum);                         \
-       asm volatile ("stfd [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \
-})
-
-#define ia64_stfe(x, regnum)                                           \
-({                                                                     \
-       register double __f__ asm ("f"#regnum);                         \
-       asm volatile ("stfe [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \
-})
-
-#define ia64_stf8(x, regnum)                                           \
-({                                                                     \
-       register double __f__ asm ("f"#regnum);                         \
-       asm volatile ("stf8 [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \
-})
-
-#define ia64_stf_spill(x, regnum)                                              \
-({                                                                             \
-       register double __f__ asm ("f"#regnum);                                 \
-       asm volatile ("stf.spill [%0]=%1" :: "r"(x), "f"(__f__) : "memory");    \
-})
-
-#define ia64_fetchadd4_acq(p, inc)                                             \
-({                                                                             \
-                                                                               \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("fetchadd4.acq %0=[%1],%2"                                \
-                               : "=r"(ia64_intri_res) : "r"(p), "i" (inc)      \
-                               : "memory");                                    \
-                                                                               \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_fetchadd4_rel(p, inc)                                             \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("fetchadd4.rel %0=[%1],%2"                                \
-                               : "=r"(ia64_intri_res) : "r"(p), "i" (inc)      \
-                               : "memory");                                    \
-                                                                               \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_fetchadd8_acq(p, inc)                                             \
-({                                                                             \
-                                                                               \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("fetchadd8.acq %0=[%1],%2"                                \
-                               : "=r"(ia64_intri_res) : "r"(p), "i" (inc)      \
-                               : "memory");                                    \
-                                                                               \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_fetchadd8_rel(p, inc)                                             \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("fetchadd8.rel %0=[%1],%2"                                \
-                               : "=r"(ia64_intri_res) : "r"(p), "i" (inc)      \
-                               : "memory");                                    \
-                                                                               \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_xchg1(ptr,x)                                                      \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("xchg1 %0=[%1],%2"                                        \
-                     : "=r" (ia64_intri_res) : "r" (ptr), "r" (x) : "memory"); \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_xchg2(ptr,x)                                              \
-({                                                                     \
-       __u64 ia64_intri_res;                                           \
-       asm volatile ("xchg2 %0=[%1],%2" : "=r" (ia64_intri_res)        \
-                     : "r" (ptr), "r" (x) : "memory");                 \
-       ia64_intri_res;                                                 \
-})
-
-#define ia64_xchg4(ptr,x)                                              \
-({                                                                     \
-       __u64 ia64_intri_res;                                           \
-       asm volatile ("xchg4 %0=[%1],%2" : "=r" (ia64_intri_res)        \
-                     : "r" (ptr), "r" (x) : "memory");                 \
-       ia64_intri_res;                                                 \
-})
-
-#define ia64_xchg8(ptr,x)                                              \
-({                                                                     \
-       __u64 ia64_intri_res;                                           \
-       asm volatile ("xchg8 %0=[%1],%2" : "=r" (ia64_intri_res)        \
-                     : "r" (ptr), "r" (x) : "memory");                 \
-       ia64_intri_res;                                                 \
-})
-
-#define ia64_cmpxchg1_acq(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-       asm volatile ("cmpxchg1.acq %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg1_rel(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-       asm volatile ("cmpxchg1.rel %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg2_acq(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-       asm volatile ("cmpxchg2.acq %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg2_rel(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-                                                                                       \
-       asm volatile ("cmpxchg2.rel %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg4_acq(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-       asm volatile ("cmpxchg4.acq %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg4_rel(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-       asm volatile ("cmpxchg4.rel %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg8_acq(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-       asm volatile ("cmpxchg8.acq %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_cmpxchg8_rel(ptr, new, old)                                               \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                                  \
-                                                                                       \
-       asm volatile ("cmpxchg8.rel %0=[%1],%2,ar.ccv":                                 \
-                             "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory");    \
-       ia64_intri_res;                                                                 \
-})
-
-#define ia64_mf()      asm volatile ("mf" ::: "memory")
-#define ia64_mfa()     asm volatile ("mf.a" ::: "memory")
-
-#ifdef CONFIG_VTI
-/*
- * Flushrs instruction stream.
- */
-#define ia64_flushrs() asm volatile ("flushrs;;":::"memory")
-
-#define ia64_loadrs() asm volatile ("loadrs;;":::"memory")
-
-#define ia64_get_rsc()                          \
-({                                  \
-    unsigned long val;                     \
-    asm volatile ("mov %0=ar.rsc;;" : "=r"(val) :: "memory");  \
-    val;                               \
-})
-
-#define ia64_set_rsc(val)                       \
-    asm volatile ("mov ar.rsc=%0;;" :: "r"(val) : "memory")
-
-#define ia64_get_bspstore()     \
-({                                  \
-    unsigned long val;                     \
-    asm volatile ("mov %0=ar.bspstore;;" : "=r"(val) :: "memory");  \
-    val;                               \
-})
-
-#define ia64_set_bspstore(val)                       \
-    asm volatile ("mov ar.bspstore=%0;;" :: "r"(val) : "memory")
-
-#define ia64_get_rnat()     \
-({                                  \
-    unsigned long val;                     \
-    asm volatile ("mov %0=ar.rnat;" : "=r"(val) :: "memory");  \
-    val;                               \
-})
-
-#define ia64_set_rnat(val)                       \
-    asm volatile ("mov ar.rnat=%0;;" :: "r"(val) : "memory")
-
-#define ia64_ttag(addr)                                                        \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr));        \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_get_dcr()                          \
-({                                      \
-    __u64 result;                               \
-    asm volatile ("mov %0=cr.dcr" : "=r"(result) : );           \
-    result;                                 \
-})
-
-#define ia64_set_dcr(val)                           \
-({                                      \
-    asm volatile ("mov cr.dcr=%0" :: "r"(val) );            \
-})
-
-#endif // CONFIG_VTI
-
-
-#define ia64_invala() asm volatile ("invala" ::: "memory")
-
-#define ia64_thash(addr)                                                       \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr));       \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_srlz_i()  asm volatile (";; srlz.i ;;" ::: "memory")
-#define ia64_srlz_d()  asm volatile (";; srlz.d" ::: "memory");
-
-#ifdef HAVE_SERIALIZE_DIRECTIVE
-# define ia64_dv_serialize_data()              asm volatile (".serialize.data");
-# define ia64_dv_serialize_instruction()       asm volatile (".serialize.instruction");
-#else
-# define ia64_dv_serialize_data()
-# define ia64_dv_serialize_instruction()
-#endif
-
-#define ia64_nop(x)    asm volatile ("nop %0"::"i"(x));
-
-#define ia64_itci(addr)        asm volatile ("itc.i %0;;" :: "r"(addr) : "memory")
-
-#define ia64_itcd(addr)        asm volatile ("itc.d %0;;" :: "r"(addr) : "memory")
-
-
-#define ia64_itri(trnum, addr) asm volatile ("itr.i itr[%0]=%1"                                \
-                                            :: "r"(trnum), "r"(addr) : "memory")
-
-#define ia64_itrd(trnum, addr) asm volatile ("itr.d dtr[%0]=%1"                                \
-                                            :: "r"(trnum), "r"(addr) : "memory")
-
-#define ia64_tpa(addr)                                                         \
-({                                                                             \
-       __u64 ia64_pa;                                                          \
-       asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory");    \
-       ia64_pa;                                                                \
-})
-
-#define __ia64_set_dbr(index, val)                                             \
-       asm volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory")
-
-#define ia64_set_ibr(index, val)                                               \
-       asm volatile ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory")
-
-#define ia64_set_pkr(index, val)                                               \
-       asm volatile ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory")
-
-#define ia64_set_pmc(index, val)                                               \
-       asm volatile ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory")
-
-#define ia64_set_pmd(index, val)                                               \
-       asm volatile ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory")
-
-#define ia64_set_rr(index, val)                                                        \
-       asm volatile ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory");
-
-#define ia64_get_cpuid(index)                                                          \
-({                                                                                     \
-       __u64 ia64_intri_res;                                                           \
-       asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index));        \
-       ia64_intri_res;                                                                 \
-})
-
-#define __ia64_get_dbr(index)                                                  \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index));    \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_get_ibr(index)                                                    \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index));    \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_get_pkr(index)                                                    \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index));    \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_get_pmc(index)                                                    \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index));    \
-       ia64_intri_res;                                                         \
-})
-
-
-#define ia64_get_pmd(index)                                                    \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index));    \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_get_rr(index)                                                     \
-({                                                                             \
-       __u64 ia64_intri_res;                                                   \
-       asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index));    \
-       ia64_intri_res;                                                         \
-})
-
-#define ia64_fc(addr)  asm volatile ("fc %0" :: "r"(addr) : "memory")
-
-
-#define ia64_sync_i()  asm volatile (";; sync.i" ::: "memory")
-
-#define ia64_ssm(mask) asm volatile ("ssm %0":: "i"((mask)) : "memory")
-#define ia64_rsm(mask) asm volatile ("rsm %0":: "i"((mask)) : "memory")
-#define ia64_sum(mask) asm volatile ("sum %0":: "i"((mask)) : "memory")
-#define ia64_rum(mask) asm volatile ("rum %0":: "i"((mask)) : "memory")
-
-#define ia64_ptce(addr)        asm volatile ("ptc.e %0" :: "r"(addr))
-
-#define ia64_ptcga(addr, size)                                                 \
-do {                                                                           \
-       asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory");       \
-       ia64_dv_serialize_data();                                               \
-} while (0)
-
-#define ia64_ptcl(addr, size)                                                  \
-do {                                                                           \
-       asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory");        \
-       ia64_dv_serialize_data();                                               \
-} while (0)
-
-#define ia64_ptri(addr, size)                                          \
-       asm volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory")
-
-#define ia64_ptrd(addr, size)                                          \
-       asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory")
-
-/* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */
-
-#define ia64_lfhint_none   0
-#define ia64_lfhint_nt1    1
-#define ia64_lfhint_nt2    2
-#define ia64_lfhint_nta    3
-
-#define ia64_lfetch(lfhint, y)                                 \
-({                                                             \
-        switch (lfhint) {                                      \
-        case ia64_lfhint_none:                                 \
-                asm volatile ("lfetch [%0]" : : "r"(y));       \
-                break;                                         \
-        case ia64_lfhint_nt1:                                  \
-                asm volatile ("lfetch.nt1 [%0]" : : "r"(y));   \
-                break;                                         \
-        case ia64_lfhint_nt2:                                  \
-                asm volatile ("lfetch.nt2 [%0]" : : "r"(y));   \
-                break;                                         \
-        case ia64_lfhint_nta:                                  \
-                asm volatile ("lfetch.nta [%0]" : : "r"(y));   \
-                break;                                         \
-        }                                                      \
-})
-
-#define ia64_lfetch_excl(lfhint, y)                                    \
-({                                                                     \
-        switch (lfhint) {                                              \
-        case ia64_lfhint_none:                                         \
-                asm volatile ("lfetch.excl [%0]" :: "r"(y));           \
-                break;                                                 \
-        case ia64_lfhint_nt1:                                          \
-                asm volatile ("lfetch.excl.nt1 [%0]" :: "r"(y));       \
-                break;                                                 \
-        case ia64_lfhint_nt2:                                          \
-                asm volatile ("lfetch.excl.nt2 [%0]" :: "r"(y));       \
-                break;                                                 \
-        case ia64_lfhint_nta:                                          \
-                asm volatile ("lfetch.excl.nta [%0]" :: "r"(y));       \
-                break;                                                 \
-        }                                                              \
-})
-
-#define ia64_lfetch_fault(lfhint, y)                                   \
-({                                                                     \
-        switch (lfhint) {                                              \
-        case ia64_lfhint_none:                                         \
-                asm volatile ("lfetch.fault [%0]" : : "r"(y));         \
-                break;                                                 \
-        case ia64_lfhint_nt1:                                          \
-                asm volatile ("lfetch.fault.nt1 [%0]" : : "r"(y));     \
-                break;                                                 \
-        case ia64_lfhint_nt2:                                          \
-                asm volatile ("lfetch.fault.nt2 [%0]" : : "r"(y));     \
-                break;                                                 \
-        case ia64_lfhint_nta:                                          \
-                asm volatile ("lfetch.fault.nta [%0]" : : "r"(y));     \
-                break;                                                 \
-        }                                                              \
-})
-
-#define ia64_lfetch_fault_excl(lfhint, y)                              \
-({                                                                     \
-        switch (lfhint) {                                              \
-        case ia64_lfhint_none:                                         \
-                asm volatile ("lfetch.fault.excl [%0]" :: "r"(y));     \
-                break;                                                 \
-        case ia64_lfhint_nt1:                                          \
-                asm volatile ("lfetch.fault.excl.nt1 [%0]" :: "r"(y)); \
-                break;                                                 \
-        case ia64_lfhint_nt2:                                          \
-                asm volatile ("lfetch.fault.excl.nt2 [%0]" :: "r"(y)); \
-                break;                                                 \
-        case ia64_lfhint_nta:                                          \
-                asm volatile ("lfetch.fault.excl.nta [%0]" :: "r"(y)); \
-                break;                                                 \
-        }                                                              \
-})
-
-#define ia64_intrin_local_irq_restore(x)                       \
-do {                                                           \
-       asm volatile (";;   cmp.ne p6,p7=%0,r0;;"               \
-                     "(p6) ssm psr.i;"                         \
-                     "(p7) rsm psr.i;;"                        \
-                     "(p6) srlz.d"                             \
-                     :: "r"((x)) : "p6", "p7", "memory");      \
-} while (0)
-
-#endif /* _ASM_IA64_GCC_INTRIN_H */
diff --git a/xen/include/asm-ia64/ia64regs.h b/xen/include/asm-ia64/ia64regs.h
deleted file mode 100644 (file)
index d30d54d..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2002,2003 Intel Corp.
- *      Jun Nakajima <jun.nakajima@intel.com>
- *      Suresh Siddha <suresh.b.siddha@intel.com>
- */
-
-#ifndef _ASM_IA64_IA64REGS_H
-#define _ASM_IA64_IA64REGS_H
-
-/*
- * Register Names for getreg() and setreg().
- *
- * The "magic" numbers happen to match the values used by the Intel compiler's
- * getreg()/setreg() intrinsics.
- */
-
-/* Special Registers */
-
-#define _IA64_REG_IP           1016    /* getreg only */
-#define _IA64_REG_PSR          1019
-#define _IA64_REG_PSR_L                1019
-
-/* General Integer Registers */
-
-#define _IA64_REG_GP           1025    /* R1 */
-#define _IA64_REG_R8           1032    /* R8 */
-#define _IA64_REG_R9           1033    /* R9 */
-#define _IA64_REG_SP           1036    /* R12 */
-#define _IA64_REG_TP           1037    /* R13 */
-
-/* Application Registers */
-
-#define _IA64_REG_AR_KR0       3072
-#define _IA64_REG_AR_KR1       3073
-#define _IA64_REG_AR_KR2       3074
-#define _IA64_REG_AR_KR3       3075
-#define _IA64_REG_AR_KR4       3076
-#define _IA64_REG_AR_KR5       3077
-#define _IA64_REG_AR_KR6       3078
-#define _IA64_REG_AR_KR7       3079
-#define _IA64_REG_AR_RSC       3088
-#define _IA64_REG_AR_BSP       3089
-#define _IA64_REG_AR_BSPSTORE  3090
-#define _IA64_REG_AR_RNAT      3091
-#define _IA64_REG_AR_FCR       3093
-#define _IA64_REG_AR_EFLAG     3096
-#define _IA64_REG_AR_CSD       3097
-#define _IA64_REG_AR_SSD       3098
-#define _IA64_REG_AR_CFLAG     3099
-#define _IA64_REG_AR_FSR       3100
-#define _IA64_REG_AR_FIR       3101
-#define _IA64_REG_AR_FDR       3102
-#define _IA64_REG_AR_CCV       3104
-#define _IA64_REG_AR_UNAT      3108
-#define _IA64_REG_AR_FPSR      3112
-#define _IA64_REG_AR_ITC       3116
-#define _IA64_REG_AR_PFS       3136
-#define _IA64_REG_AR_LC                3137
-#define _IA64_REG_AR_EC                3138
-
-/* Control Registers */
-
-#define _IA64_REG_CR_DCR       4096
-#define _IA64_REG_CR_ITM       4097
-#define _IA64_REG_CR_IVA       4098
-#define _IA64_REG_CR_PTA       4104
-#define _IA64_REG_CR_IPSR      4112
-#define _IA64_REG_CR_ISR       4113
-#define _IA64_REG_CR_IIP       4115
-#define _IA64_REG_CR_IFA       4116
-#define _IA64_REG_CR_ITIR      4117
-#define _IA64_REG_CR_IIPA      4118
-#define _IA64_REG_CR_IFS       4119
-#define _IA64_REG_CR_IIM       4120
-#define _IA64_REG_CR_IHA       4121
-#define _IA64_REG_CR_LID       4160
-#define _IA64_REG_CR_IVR       4161    /* getreg only */
-#define _IA64_REG_CR_TPR       4162
-#define _IA64_REG_CR_EOI       4163
-#define _IA64_REG_CR_IRR0      4164    /* getreg only */
-#define _IA64_REG_CR_IRR1      4165    /* getreg only */
-#define _IA64_REG_CR_IRR2      4166    /* getreg only */
-#define _IA64_REG_CR_IRR3      4167    /* getreg only */
-#define _IA64_REG_CR_ITV       4168
-#define _IA64_REG_CR_PMV       4169
-#define _IA64_REG_CR_CMCV      4170
-#define _IA64_REG_CR_LRR0      4176
-#define _IA64_REG_CR_LRR1      4177
-
-#ifdef  CONFIG_VTI
-#define IA64_REG_CR_DCR   0
-#define IA64_REG_CR_ITM   1
-#define IA64_REG_CR_IVA   2
-#define IA64_REG_CR_PTA   8
-#define IA64_REG_CR_IPSR  16
-#define IA64_REG_CR_ISR   17
-#define IA64_REG_CR_IIP   19
-#define IA64_REG_CR_IFA   20
-#define IA64_REG_CR_ITIR  21
-#define IA64_REG_CR_IIPA  22
-#define IA64_REG_CR_IFS   23
-#define IA64_REG_CR_IIM   24
-#define IA64_REG_CR_IHA   25
-#define IA64_REG_CR_LID   64
-#define IA64_REG_CR_IVR   65
-#define IA64_REG_CR_TPR   66
-#define IA64_REG_CR_EOI   67
-#define IA64_REG_CR_IRR0  68
-#define IA64_REG_CR_IRR1  69
-#define IA64_REG_CR_IRR2  70
-#define IA64_REG_CR_IRR3  71
-#define IA64_REG_CR_ITV   72
-#define IA64_REG_CR_PMV   73
-#define IA64_REG_CR_CMCV  74
-#define IA64_REG_CR_LRR0  80
-#define IA64_REG_CR_LRR1  81
-#endif  //  CONFIG_VTI
-
-/* Indirect Registers for getindreg() and setindreg() */
-
-#define _IA64_REG_INDR_CPUID   9000    /* getindreg only */
-#define _IA64_REG_INDR_DBR     9001
-#define _IA64_REG_INDR_IBR     9002
-#define _IA64_REG_INDR_PKR     9003
-#define _IA64_REG_INDR_PMC     9004
-#define _IA64_REG_INDR_PMD     9005
-#define _IA64_REG_INDR_RR      9006
-
-#endif /* _ASM_IA64_IA64REGS_H */
diff --git a/xen/include/asm-ia64/pal.h b/xen/include/asm-ia64/pal.h
deleted file mode 100644 (file)
index 55612c1..0000000
+++ /dev/null
@@ -1,1567 +0,0 @@
-#ifndef _ASM_IA64_PAL_H
-#define _ASM_IA64_PAL_H
-
-/*
- * Processor Abstraction Layer definitions.
- *
- * This is based on Intel IA-64 Architecture Software Developer's Manual rev 1.0
- * chapter 11 IA-64 Processor Abstraction Layer
- *
- * Copyright (C) 1998-2001 Hewlett-Packard Co
- *     David Mosberger-Tang <davidm@hpl.hp.com>
- *     Stephane Eranian <eranian@hpl.hp.com>
- * Copyright (C) 1999 VA Linux Systems
- * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
- * Copyright (C) 1999 Srinivasa Prasad Thirumalachar <sprasad@sprasad.engr.sgi.com>
- *
- * 99/10/01    davidm  Make sure we pass zero for reserved parameters.
- * 00/03/07    davidm  Updated pal_cache_flush() to be in sync with PAL v2.6.
- * 00/03/23     cfleck  Modified processor min-state save area to match updated PAL & SAL info
- * 00/05/24     eranian Updated to latest PAL spec, fix structures bugs, added
- * 00/05/25    eranian Support for stack calls, and static physical calls
- * 00/06/18    eranian Support for stacked physical calls
- */
-
-/*
- * Note that some of these calls use a static-register only calling
- * convention which has nothing to do with the regular calling
- * convention.
- */
-#define PAL_CACHE_FLUSH                1       /* flush i/d cache */
-#define PAL_CACHE_INFO         2       /* get detailed i/d cache info */
-#define PAL_CACHE_INIT         3       /* initialize i/d cache */
-#define PAL_CACHE_SUMMARY      4       /* get summary of cache heirarchy */
-#define PAL_MEM_ATTRIB         5       /* list supported memory attributes */
-#define PAL_PTCE_INFO          6       /* purge TLB info */
-#define PAL_VM_INFO            7       /* return supported virtual memory features */
-#define PAL_VM_SUMMARY         8       /* return summary on supported vm features */
-#define PAL_BUS_GET_FEATURES   9       /* return processor bus interface features settings */
-#define PAL_BUS_SET_FEATURES   10      /* set processor bus features */
-#define PAL_DEBUG_INFO         11      /* get number of debug registers */
-#define PAL_FIXED_ADDR         12      /* get fixed component of processors's directed address */
-#define PAL_FREQ_BASE          13      /* base frequency of the platform */
-#define PAL_FREQ_RATIOS                14      /* ratio of processor, bus and ITC frequency */
-#define PAL_PERF_MON_INFO      15      /* return performance monitor info */
-#define PAL_PLATFORM_ADDR      16      /* set processor interrupt block and IO port space addr */
-#define PAL_PROC_GET_FEATURES  17      /* get configurable processor features & settings */
-#define PAL_PROC_SET_FEATURES  18      /* enable/disable configurable processor features */
-#define PAL_RSE_INFO           19      /* return rse information */
-#define PAL_VERSION            20      /* return version of PAL code */
-#define PAL_MC_CLEAR_LOG       21      /* clear all processor log info */
-#define PAL_MC_DRAIN           22      /* drain operations which could result in an MCA */
-#define PAL_MC_EXPECTED                23      /* set/reset expected MCA indicator */
-#define PAL_MC_DYNAMIC_STATE   24      /* get processor dynamic state */
-#define PAL_MC_ERROR_INFO      25      /* get processor MCA info and static state */
-#define PAL_MC_RESUME          26      /* Return to interrupted process */
-#define PAL_MC_REGISTER_MEM    27      /* Register memory for PAL to use during MCAs and inits */
-#define PAL_HALT               28      /* enter the low power HALT state */
-#define PAL_HALT_LIGHT         29      /* enter the low power light halt state*/
-#define PAL_COPY_INFO          30      /* returns info needed to relocate PAL */
-#define PAL_CACHE_LINE_INIT    31      /* init tags & data of cache line */
-#define PAL_PMI_ENTRYPOINT     32      /* register PMI memory entry points with the processor */
-#define PAL_ENTER_IA_32_ENV    33      /* enter IA-32 system environment */
-#define PAL_VM_PAGE_SIZE       34      /* return vm TC and page walker page sizes */
-
-#define PAL_MEM_FOR_TEST       37      /* get amount of memory needed for late processor test */
-#define PAL_CACHE_PROT_INFO    38      /* get i/d cache protection info */
-#define PAL_REGISTER_INFO      39      /* return AR and CR register information*/
-#define PAL_SHUTDOWN           40      /* enter processor shutdown state */
-#define PAL_PREFETCH_VISIBILITY        41      /* Make Processor Prefetches Visible */
-
-#define PAL_COPY_PAL           256     /* relocate PAL procedures and PAL PMI */
-#define PAL_HALT_INFO          257     /* return the low power capabilities of processor */
-#define PAL_TEST_PROC          258     /* perform late processor self-test */
-#define PAL_CACHE_READ         259     /* read tag & data of cacheline for diagnostic testing */
-#define PAL_CACHE_WRITE                260     /* write tag & data of cacheline for diagnostic testing */
-#define PAL_VM_TR_READ         261     /* read contents of translation register */
-
-#ifndef __ASSEMBLY__
-
-#include <linux/types.h>
-#include <asm/fpu.h>
-
-/*
- * Data types needed to pass information into PAL procedures and
- * interpret information returned by them.
- */
-
-/* Return status from the PAL procedure */
-typedef s64                            pal_status_t;
-
-#define PAL_STATUS_SUCCESS             0       /* No error */
-#define PAL_STATUS_UNIMPLEMENTED       (-1)    /* Unimplemented procedure */
-#define PAL_STATUS_EINVAL              (-2)    /* Invalid argument */
-#define PAL_STATUS_ERROR               (-3)    /* Error */
-#define PAL_STATUS_CACHE_INIT_FAIL     (-4)    /* Could not initialize the
-                                                * specified level and type of
-                                                * cache without sideeffects
-                                                * and "restrict" was 1
-                                                */
-
-/* Processor cache level in the heirarchy */
-typedef u64                            pal_cache_level_t;
-#define PAL_CACHE_LEVEL_L0             0       /* L0 */
-#define PAL_CACHE_LEVEL_L1             1       /* L1 */
-#define PAL_CACHE_LEVEL_L2             2       /* L2 */
-
-
-/* Processor cache type at a particular level in the heirarchy */
-
-typedef u64                            pal_cache_type_t;
-#define PAL_CACHE_TYPE_INSTRUCTION     1       /* Instruction cache */
-#define PAL_CACHE_TYPE_DATA            2       /* Data or unified cache */
-#define PAL_CACHE_TYPE_INSTRUCTION_DATA        3       /* Both Data & Instruction */
-
-
-#define PAL_CACHE_FLUSH_INVALIDATE     1       /* Invalidate clean lines */
-#define PAL_CACHE_FLUSH_CHK_INTRS      2       /* check for interrupts/mc while flushing */
-
-/* Processor cache line size in bytes  */
-typedef int                            pal_cache_line_size_t;
-
-/* Processor cache line state */
-typedef u64                            pal_cache_line_state_t;
-#define PAL_CACHE_LINE_STATE_INVALID   0       /* Invalid */
-#define PAL_CACHE_LINE_STATE_SHARED    1       /* Shared */
-#define PAL_CACHE_LINE_STATE_EXCLUSIVE 2       /* Exclusive */
-#define PAL_CACHE_LINE_STATE_MODIFIED  3       /* Modified */
-
-typedef struct pal_freq_ratio {
-       u64 den : 32, num : 32; /* numerator & denominator */
-} itc_ratio, proc_ratio;
-
-typedef        union  pal_cache_config_info_1_s {
-       struct {
-               u64             u               : 1,    /* 0 Unified cache ? */
-                               at              : 2,    /* 2-1 Cache mem attr*/
-                               reserved        : 5,    /* 7-3 Reserved */
-                               associativity   : 8,    /* 16-8 Associativity*/
-                               line_size       : 8,    /* 23-17 Line size */
-                               stride          : 8,    /* 31-24 Stride */
-                               store_latency   : 8,    /*39-32 Store latency*/
-                               load_latency    : 8,    /* 47-40 Load latency*/
-                               store_hints     : 8,    /* 55-48 Store hints*/
-                               load_hints      : 8;    /* 63-56 Load hints */
-       } pcci1_bits;
-       u64                     pcci1_data;
-} pal_cache_config_info_1_t;
-
-typedef        union  pal_cache_config_info_2_s {
-       struct {
-               u64             cache_size      : 32,   /*cache size in bytes*/
-
-
-                               alias_boundary  : 8,    /* 39-32 aliased addr
-                                                        * separation for max
-                                                        * performance.
-                                                        */
-                               tag_ls_bit      : 8,    /* 47-40 LSb of addr*/
-                               tag_ms_bit      : 8,    /* 55-48 MSb of addr*/
-                               reserved        : 8;    /* 63-56 Reserved */
-       } pcci2_bits;
-       u64                     pcci2_data;
-} pal_cache_config_info_2_t;
-
-
-typedef struct pal_cache_config_info_s {
-       pal_status_t                    pcci_status;
-       pal_cache_config_info_1_t       pcci_info_1;
-       pal_cache_config_info_2_t       pcci_info_2;
-       u64                             pcci_reserved;
-} pal_cache_config_info_t;
-
-#define pcci_ld_hints          pcci_info_1.pcci1_bits.load_hints
-#define pcci_st_hints          pcci_info_1.pcci1_bits.store_hints
-#define pcci_ld_latency                pcci_info_1.pcci1_bits.load_latency
-#define pcci_st_latency                pcci_info_1.pcci1_bits.store_latency
-#define pcci_stride            pcci_info_1.pcci1_bits.stride
-#define pcci_line_size         pcci_info_1.pcci1_bits.line_size
-#define pcci_assoc             pcci_info_1.pcci1_bits.associativity
-#define pcci_cache_attr                pcci_info_1.pcci1_bits.at
-#define pcci_unified           pcci_info_1.pcci1_bits.u
-#define pcci_tag_msb           pcci_info_2.pcci2_bits.tag_ms_bit
-#define pcci_tag_lsb           pcci_info_2.pcci2_bits.tag_ls_bit
-#define pcci_alias_boundary    pcci_info_2.pcci2_bits.alias_boundary
-#define pcci_cache_size                pcci_info_2.pcci2_bits.cache_size
-
-
-
-/* Possible values for cache attributes */
-
-#define PAL_CACHE_ATTR_WT              0       /* Write through cache */
-#define PAL_CACHE_ATTR_WB              1       /* Write back cache */
-#define PAL_CACHE_ATTR_WT_OR_WB                2       /* Either write thru or write
-                                                * back depending on TLB
-                                                * memory attributes
-                                                */
-
-
-/* Possible values for cache hints */
-
-#define PAL_CACHE_HINT_TEMP_1          0       /* Temporal level 1 */
-#define PAL_CACHE_HINT_NTEMP_1         1       /* Non-temporal level 1 */
-#define PAL_CACHE_HINT_NTEMP_ALL       3       /* Non-temporal all levels */
-
-/* Processor cache protection  information */
-typedef union pal_cache_protection_element_u {
-       u32                     pcpi_data;
-       struct {
-               u32             data_bits       : 8, /* # data bits covered by
-                                                     * each unit of protection
-                                                     */
-
-                               tagprot_lsb     : 6, /* Least -do- */
-                               tagprot_msb     : 6, /* Most Sig. tag address
-                                                     * bit that this
-                                                     * protection covers.
-                                                     */
-                               prot_bits       : 6, /* # of protection bits */
-                               method          : 4, /* Protection method */
-                               t_d             : 2; /* Indicates which part
-                                                     * of the cache this
-                                                     * protection encoding
-                                                     * applies.
-                                                     */
-       } pcp_info;
-} pal_cache_protection_element_t;
-
-#define pcpi_cache_prot_part   pcp_info.t_d
-#define pcpi_prot_method       pcp_info.method
-#define pcpi_prot_bits         pcp_info.prot_bits
-#define pcpi_tagprot_msb       pcp_info.tagprot_msb
-#define pcpi_tagprot_lsb       pcp_info.tagprot_lsb
-#define pcpi_data_bits         pcp_info.data_bits
-
-/* Processor cache part encodings */
-#define PAL_CACHE_PROT_PART_DATA       0       /* Data protection  */
-#define PAL_CACHE_PROT_PART_TAG                1       /* Tag  protection */
-#define PAL_CACHE_PROT_PART_TAG_DATA   2       /* Tag+data protection (tag is
-                                                * more significant )
-                                                */
-#define PAL_CACHE_PROT_PART_DATA_TAG   3       /* Data+tag protection (data is
-                                                * more significant )
-                                                */
-#define PAL_CACHE_PROT_PART_MAX                6
-
-
-typedef struct pal_cache_protection_info_s {
-       pal_status_t                    pcpi_status;
-       pal_cache_protection_element_t  pcp_info[PAL_CACHE_PROT_PART_MAX];
-} pal_cache_protection_info_t;
-
-
-/* Processor cache protection method encodings */
-#define PAL_CACHE_PROT_METHOD_NONE             0       /* No protection */
-#define PAL_CACHE_PROT_METHOD_ODD_PARITY       1       /* Odd parity */
-#define PAL_CACHE_PROT_METHOD_EVEN_PARITY      2       /* Even parity */
-#define PAL_CACHE_PROT_METHOD_ECC              3       /* ECC protection */
-
-
-/* Processor cache line identification in the heirarchy */
-typedef union pal_cache_line_id_u {
-       u64                     pclid_data;
-       struct {
-               u64             cache_type      : 8,    /* 7-0 cache type */
-                               level           : 8,    /* 15-8 level of the
-                                                        * cache in the
-                                                        * heirarchy.
-                                                        */
-                               way             : 8,    /* 23-16 way in the set
-                                                        */
-                               part            : 8,    /* 31-24 part of the
-                                                        * cache
-                                                        */
-                               reserved        : 32;   /* 63-32 is reserved*/
-       } pclid_info_read;
-       struct {
-               u64             cache_type      : 8,    /* 7-0 cache type */
-                               level           : 8,    /* 15-8 level of the
-                                                        * cache in the
-                                                        * heirarchy.
-                                                        */
-                               way             : 8,    /* 23-16 way in the set
-                                                        */
-                               part            : 8,    /* 31-24 part of the
-                                                        * cache
-                                                        */
-                               mesi            : 8,    /* 39-32 cache line
-                                                        * state
-                                                        */
-                               start           : 8,    /* 47-40 lsb of data to
-                                                        * invert
-                                                        */
-                               length          : 8,    /* 55-48 #bits to
-                                                        * invert
-                                                        */
-                               trigger         : 8;    /* 63-56 Trigger error
-                                                        * by doing a load
-                                                        * after the write
-                                                        */
-
-       } pclid_info_write;
-} pal_cache_line_id_u_t;
-
-#define pclid_read_part                pclid_info_read.part
-#define pclid_read_way         pclid_info_read.way
-#define pclid_read_level       pclid_info_read.level
-#define pclid_read_cache_type  pclid_info_read.cache_type
-
-#define pclid_write_trigger    pclid_info_write.trigger
-#define pclid_write_length     pclid_info_write.length
-#define pclid_write_start      pclid_info_write.start
-#define pclid_write_mesi       pclid_info_write.mesi
-#define pclid_write_part       pclid_info_write.part
-#define pclid_write_way                pclid_info_write.way
-#define pclid_write_level      pclid_info_write.level
-#define pclid_write_cache_type pclid_info_write.cache_type
-
-/* Processor cache line part encodings */
-#define PAL_CACHE_LINE_ID_PART_DATA            0       /* Data */
-#define PAL_CACHE_LINE_ID_PART_TAG             1       /* Tag */
-#define PAL_CACHE_LINE_ID_PART_DATA_PROT       2       /* Data protection */
-#define PAL_CACHE_LINE_ID_PART_TAG_PROT                3       /* Tag protection */
-#define PAL_CACHE_LINE_ID_PART_DATA_TAG_PROT   4       /* Data+tag
-                                                        * protection
-                                                        */
-typedef struct pal_cache_line_info_s {
-       pal_status_t            pcli_status;            /* Return status of the read cache line
-                                                        * info call.
-                                                        */
-       u64                     pcli_data;              /* 64-bit data, tag, protection bits .. */
-       u64                     pcli_data_len;          /* data length in bits */
-       pal_cache_line_state_t  pcli_cache_line_state;  /* mesi state */
-
-} pal_cache_line_info_t;
-
-
-/* Machine Check related crap */
-
-/* Pending event status bits  */
-typedef u64                                    pal_mc_pending_events_t;
-
-#define PAL_MC_PENDING_MCA                     (1 << 0)
-#define PAL_MC_PENDING_INIT                    (1 << 1)
-
-/* Error information type */
-typedef u64                                    pal_mc_info_index_t;
-
-#define PAL_MC_INFO_PROCESSOR                  0       /* Processor */
-#define PAL_MC_INFO_CACHE_CHECK                        1       /* Cache check */
-#define PAL_MC_INFO_TLB_CHECK                  2       /* Tlb check */
-#define PAL_MC_INFO_BUS_CHECK                  3       /* Bus check */
-#define PAL_MC_INFO_REQ_ADDR                   4       /* Requestor address */
-#define PAL_MC_INFO_RESP_ADDR                  5       /* Responder address */
-#define PAL_MC_INFO_TARGET_ADDR                        6       /* Target address */
-#define PAL_MC_INFO_IMPL_DEP                   7       /* Implementation
-                                                        * dependent
-                                                        */
-
-
-typedef struct pal_process_state_info_s {
-       u64             reserved1       : 2,
-                       rz              : 1,    /* PAL_CHECK processor
-                                                * rendezvous
-                                                * successful.
-                                                */
-
-                       ra              : 1,    /* PAL_CHECK attempted
-                                                * a rendezvous.
-                                                */
-                       me              : 1,    /* Distinct multiple
-                                                * errors occurred
-                                                */
-
-                       mn              : 1,    /* Min. state save
-                                                * area has been
-                                                * registered with PAL
-                                                */
-
-                       sy              : 1,    /* Storage integrity
-                                                * synched
-                                                */
-
-
-                       co              : 1,    /* Continuable */
-                       ci              : 1,    /* MC isolated */
-                       us              : 1,    /* Uncontained storage
-                                                * damage.
-                                                */
-
-
-                       hd              : 1,    /* Non-essential hw
-                                                * lost (no loss of
-                                                * functionality)
-                                                * causing the
-                                                * processor to run in
-                                                * degraded mode.
-                                                */
-
-                       tl              : 1,    /* 1 => MC occurred
-                                                * after an instr was
-                                                * executed but before
-                                                * the trap that
-                                                * resulted from instr
-                                                * execution was
-                                                * generated.
-                                                * (Trap Lost )
-                                                */
-                       mi              : 1,    /* More information available
-                                                * call PAL_MC_ERROR_INFO
-                                                */
-                       pi              : 1,    /* Precise instruction pointer */
-                       pm              : 1,    /* Precise min-state save area */
-
-                       dy              : 1,    /* Processor dynamic
-                                                * state valid
-                                                */
-
-
-                       in              : 1,    /* 0 = MC, 1 = INIT */
-                       rs              : 1,    /* RSE valid */
-                       cm              : 1,    /* MC corrected */
-                       ex              : 1,    /* MC is expected */
-                       cr              : 1,    /* Control regs valid*/
-                       pc              : 1,    /* Perf cntrs valid */
-                       dr              : 1,    /* Debug regs valid */
-                       tr              : 1,    /* Translation regs
-                                                * valid
-                                                */
-                       rr              : 1,    /* Region regs valid */
-                       ar              : 1,    /* App regs valid */
-                       br              : 1,    /* Branch regs valid */
-                       pr              : 1,    /* Predicate registers
-                                                * valid
-                                                */
-
-                       fp              : 1,    /* fp registers valid*/
-                       b1              : 1,    /* Preserved bank one
-                                                * general registers
-                                                * are valid
-                                                */
-                       b0              : 1,    /* Preserved bank zero
-                                                * general registers
-                                                * are valid
-                                                */
-                       gr              : 1,    /* General registers
-                                                * are valid
-                                                * (excl. banked regs)
-                                                */
-                       dsize           : 16,   /* size of dynamic
-                                                * state returned
-                                                * by the processor
-                                                */
-
-                       reserved2       : 11,
-                       cc              : 1,    /* Cache check */
-                       tc              : 1,    /* TLB check */
-                       bc              : 1,    /* Bus check */
-                       rc              : 1,    /* Register file check */
-                       uc              : 1;    /* Uarch check */
-
-} pal_processor_state_info_t;
-
-typedef struct pal_cache_check_info_s {
-       u64             op              : 4,    /* Type of cache
-                                                * operation that
-                                                * caused the machine
-                                                * check.
-                                                */
-                       level           : 2,    /* Cache level */
-                       reserved1       : 2,
-                       dl              : 1,    /* Failure in data part
-                                                * of cache line
-                                                */
-                       tl              : 1,    /* Failure in tag part
-                                                * of cache line
-                                                */
-                       dc              : 1,    /* Failure in dcache */
-                       ic              : 1,    /* Failure in icache */
-                       mesi            : 3,    /* Cache line state */
-                       mv              : 1,    /* mesi valid */
-                       way             : 5,    /* Way in which the
-                                                * error occurred
-                                                */
-                       wiv             : 1,    /* Way field valid */
-                       reserved2       : 10,
-
-                       index           : 20,   /* Cache line index */
-                       reserved3       : 2,
-
-                       is              : 1,    /* instruction set (1 == ia32) */
-                       iv              : 1,    /* instruction set field valid */
-                       pl              : 2,    /* privilege level */
-                       pv              : 1,    /* privilege level field valid */
-                       mcc             : 1,    /* Machine check corrected */
-                       tv              : 1,    /* Target address
-                                                * structure is valid
-                                                */
-                       rq              : 1,    /* Requester identifier
-                                                * structure is valid
-                                                */
-                       rp              : 1,    /* Responder identifier
-                                                * structure is valid
-                                                */
-                       pi              : 1;    /* Precise instruction pointer
-                                                * structure is valid
-                                                */
-} pal_cache_check_info_t;
-
-typedef struct pal_tlb_check_info_s {
-
-       u64             tr_slot         : 8,    /* Slot# of TR where
-                                                * error occurred
-                                                */
-                       trv             : 1,    /* tr_slot field is valid */
-                       reserved1       : 1,
-                       level           : 2,    /* TLB level where failure occurred */
-                       reserved2       : 4,
-                       dtr             : 1,    /* Fail in data TR */
-                       itr             : 1,    /* Fail in inst TR */
-                       dtc             : 1,    /* Fail in data TC */
-                       itc             : 1,    /* Fail in inst. TC */
-                       op              : 4,    /* Cache operation */
-                       reserved3       : 30,
-
-                       is              : 1,    /* instruction set (1 == ia32) */
-                       iv              : 1,    /* instruction set field valid */
-                       pl              : 2,    /* privilege level */
-                       pv              : 1,    /* privilege level field valid */
-                       mcc             : 1,    /* Machine check corrected */
-                       tv              : 1,    /* Target address
-                                                * structure is valid
-                                                */
-                       rq              : 1,    /* Requester identifier
-                                                * structure is valid
-                                                */
-                       rp              : 1,    /* Responder identifier
-                                                * structure is valid
-                                                */
-                       pi              : 1;    /* Precise instruction pointer
-                                                * structure is valid
-                                                */
-} pal_tlb_check_info_t;
-
-typedef struct pal_bus_check_info_s {
-       u64             size            : 5,    /* Xaction size */
-                       ib              : 1,    /* Internal bus error */
-                       eb              : 1,    /* External bus error */
-                       cc              : 1,    /* Error occurred
-                                                * during cache-cache
-                                                * transfer.
-                                                */
-                       type            : 8,    /* Bus xaction type*/
-                       sev             : 5,    /* Bus error severity*/
-                       hier            : 2,    /* Bus hierarchy level */
-                       reserved1       : 1,
-                       bsi             : 8,    /* Bus error status
-                                                * info
-                                                */
-                       reserved2       : 22,
-
-                       is              : 1,    /* instruction set (1 == ia32) */
-                       iv              : 1,    /* instruction set field valid */
-                       pl              : 2,    /* privilege level */
-                       pv              : 1,    /* privilege level field valid */
-                       mcc             : 1,    /* Machine check corrected */
-                       tv              : 1,    /* Target address
-                                                * structure is valid
-                                                */
-                       rq              : 1,    /* Requester identifier
-                                                * structure is valid
-                                                */
-                       rp              : 1,    /* Responder identifier
-                                                * structure is valid
-                                                */
-                       pi              : 1;    /* Precise instruction pointer
-                                                * structure is valid
-                                                */
-} pal_bus_check_info_t;
-
-typedef struct pal_reg_file_check_info_s {
-       u64             id              : 4,    /* Register file identifier */
-                       op              : 4,    /* Type of register
-                                                * operation that
-                                                * caused the machine
-                                                * check.
-                                                */
-                       reg_num         : 7,    /* Register number */
-                       rnv             : 1,    /* reg_num valid */
-                       reserved2       : 38,
-
-                       is              : 1,    /* instruction set (1 == ia32) */
-                       iv              : 1,    /* instruction set field valid */
-                       pl              : 2,    /* privilege level */
-                       pv              : 1,    /* privilege level field valid */
-                       mcc             : 1,    /* Machine check corrected */
-                       reserved3       : 3,
-                       pi              : 1;    /* Precise instruction pointer
-                                                * structure is valid
-                                                */
-} pal_reg_file_check_info_t;
-
-typedef struct pal_uarch_check_info_s {
-       u64             sid             : 5,    /* Structure identification */
-                       level           : 3,    /* Level of failure */
-                       array_id        : 4,    /* Array identification */
-                       op              : 4,    /* Type of
-                                                * operation that
-                                                * caused the machine
-                                                * check.
-                                                */
-                       way             : 6,    /* Way of structure */
-                       wv              : 1,    /* way valid */
-                       xv              : 1,    /* index valid */
-                       reserved1       : 8,
-                       index           : 8,    /* Index or set of the uarch
-                                                * structure that failed.
-                                                */
-                       reserved2       : 24,
-
-                       is              : 1,    /* instruction set (1 == ia32) */
-                       iv              : 1,    /* instruction set field valid */
-                       pl              : 2,    /* privilege level */
-                       pv              : 1,    /* privilege level field valid */
-                       mcc             : 1,    /* Machine check corrected */
-                       tv              : 1,    /* Target address
-                                                * structure is valid
-                                                */
-                       rq              : 1,    /* Requester identifier
-                                                * structure is valid
-                                                */
-                       rp              : 1,    /* Responder identifier
-                                                * structure is valid
-                                                */
-                       pi              : 1;    /* Precise instruction pointer
-                                                * structure is valid
-                                                */
-} pal_uarch_check_info_t;
-
-typedef union pal_mc_error_info_u {
-       u64                             pmei_data;
-       pal_processor_state_info_t      pme_processor;
-       pal_cache_check_info_t          pme_cache;
-       pal_tlb_check_info_t            pme_tlb;
-       pal_bus_check_info_t            pme_bus;
-       pal_reg_file_check_info_t       pme_reg_file;
-       pal_uarch_check_info_t          pme_uarch;
-} pal_mc_error_info_t;
-
-#define pmci_proc_unknown_check                        pme_processor.uc
-#define pmci_proc_bus_check                    pme_processor.bc
-#define pmci_proc_tlb_check                    pme_processor.tc
-#define pmci_proc_cache_check                  pme_processor.cc
-#define pmci_proc_dynamic_state_size           pme_processor.dsize
-#define pmci_proc_gpr_valid                    pme_processor.gr
-#define pmci_proc_preserved_bank0_gpr_valid    pme_processor.b0
-#define pmci_proc_preserved_bank1_gpr_valid    pme_processor.b1
-#define pmci_proc_fp_valid                     pme_processor.fp
-#define pmci_proc_predicate_regs_valid         pme_processor.pr
-#define pmci_proc_branch_regs_valid            pme_processor.br
-#define pmci_proc_app_regs_valid               pme_processor.ar
-#define pmci_proc_region_regs_valid            pme_processor.rr
-#define pmci_proc_translation_regs_valid       pme_processor.tr
-#define pmci_proc_debug_regs_valid             pme_processor.dr
-#define pmci_proc_perf_counters_valid          pme_processor.pc
-#define pmci_proc_control_regs_valid           pme_processor.cr
-#define pmci_proc_machine_check_expected       pme_processor.ex
-#define pmci_proc_machine_check_corrected      pme_processor.cm
-#define pmci_proc_rse_valid                    pme_processor.rs
-#define pmci_proc_machine_check_or_init                pme_processor.in
-#define pmci_proc_dynamic_state_valid          pme_processor.dy
-#define pmci_proc_operation                    pme_processor.op
-#define pmci_proc_trap_lost                    pme_processor.tl
-#define pmci_proc_hardware_damage              pme_processor.hd
-#define pmci_proc_uncontained_storage_damage   pme_processor.us
-#define pmci_proc_machine_check_isolated       pme_processor.ci
-#define pmci_proc_continuable                  pme_processor.co
-#define pmci_proc_storage_intergrity_synced    pme_processor.sy
-#define pmci_proc_min_state_save_area_regd     pme_processor.mn
-#define        pmci_proc_distinct_multiple_errors      pme_processor.me
-#define pmci_proc_pal_attempted_rendezvous     pme_processor.ra
-#define pmci_proc_pal_rendezvous_complete      pme_processor.rz
-
-
-#define pmci_cache_level                       pme_cache.level
-#define pmci_cache_line_state                  pme_cache.mesi
-#define pmci_cache_line_state_valid            pme_cache.mv
-#define pmci_cache_line_index                  pme_cache.index
-#define pmci_cache_instr_cache_fail            pme_cache.ic
-#define pmci_cache_data_cache_fail             pme_cache.dc
-#define pmci_cache_line_tag_fail               pme_cache.tl
-#define pmci_cache_line_data_fail              pme_cache.dl
-#define pmci_cache_operation                   pme_cache.op
-#define pmci_cache_way_valid                   pme_cache.wv
-#define pmci_cache_target_address_valid                pme_cache.tv
-#define pmci_cache_way                         pme_cache.way
-#define pmci_cache_mc                          pme_cache.mc
-
-#define pmci_tlb_instr_translation_cache_fail  pme_tlb.itc
-#define pmci_tlb_data_translation_cache_fail   pme_tlb.dtc
-#define pmci_tlb_instr_translation_reg_fail    pme_tlb.itr
-#define pmci_tlb_data_translation_reg_fail     pme_tlb.dtr
-#define pmci_tlb_translation_reg_slot          pme_tlb.tr_slot
-#define pmci_tlb_mc                            pme_tlb.mc
-
-#define pmci_bus_status_info                   pme_bus.bsi
-#define pmci_bus_req_address_valid             pme_bus.rq
-#define pmci_bus_resp_address_valid            pme_bus.rp
-#define pmci_bus_target_address_valid          pme_bus.tv
-#define pmci_bus_error_severity                        pme_bus.sev
-#define pmci_bus_transaction_type              pme_bus.type
-#define pmci_bus_cache_cache_transfer          pme_bus.cc
-#define pmci_bus_transaction_size              pme_bus.size
-#define pmci_bus_internal_error                        pme_bus.ib
-#define pmci_bus_external_error                        pme_bus.eb
-#define pmci_bus_mc                            pme_bus.mc
-
-/*
- * NOTE: this min_state_save area struct only includes the 1KB
- * architectural state save area.  The other 3 KB is scratch space
- * for PAL.
- */
-
-typedef struct pal_min_state_area_s {
-       u64     pmsa_nat_bits;          /* nat bits for saved GRs  */
-       u64     pmsa_gr[15];            /* GR1  - GR15             */
-       u64     pmsa_bank0_gr[16];      /* GR16 - GR31             */
-       u64     pmsa_bank1_gr[16];      /* GR16 - GR31             */
-       u64     pmsa_pr;                /* predicate registers     */
-       u64     pmsa_br0;               /* branch register 0       */
-       u64     pmsa_rsc;               /* ar.rsc                  */
-       u64     pmsa_iip;               /* cr.iip                  */
-       u64     pmsa_ipsr;              /* cr.ipsr                 */
-       u64     pmsa_ifs;               /* cr.ifs                  */
-       u64     pmsa_xip;               /* previous iip            */
-       u64     pmsa_xpsr;              /* previous psr            */
-       u64     pmsa_xfs;               /* previous ifs            */
-       u64     pmsa_br1;               /* branch register 1       */
-       u64     pmsa_reserved[70];      /* pal_min_state_area should total to 1KB */
-} pal_min_state_area_t;
-
-
-struct ia64_pal_retval {
-       /*
-        * A zero status value indicates call completed without error.
-        * A negative status value indicates reason of call failure.
-        * A positive status value indicates success but an
-        * informational value should be printed (e.g., "reboot for
-        * change to take effect").
-        */
-       s64 status;
-       u64 v0;
-       u64 v1;
-       u64 v2;
-};
-
-/*
- * Note: Currently unused PAL arguments are generally labeled
- * "reserved" so the value specified in the PAL documentation
- * (generally 0) MUST be passed.  Reserved parameters are not optional
- * parameters.
- */
-extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64, u64);
-extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64);
-extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64);
-extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64);
-extern void ia64_save_scratch_fpregs (struct ia64_fpreg *);
-extern void ia64_load_scratch_fpregs (struct ia64_fpreg *);
-
-#define PAL_CALL(iprv,a0,a1,a2,a3) do {                        \
-       struct ia64_fpreg fr[6];                        \
-       ia64_save_scratch_fpregs(fr);                   \
-       iprv = ia64_pal_call_static(a0, a1, a2, a3, 0); \
-       ia64_load_scratch_fpregs(fr);                   \
-} while (0)
-
-#define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) do {         \
-       struct ia64_fpreg fr[6];                        \
-       ia64_save_scratch_fpregs(fr);                   \
-       iprv = ia64_pal_call_static(a0, a1, a2, a3, 1); \
-       ia64_load_scratch_fpregs(fr);                   \
-} while (0)
-
-#define PAL_CALL_STK(iprv,a0,a1,a2,a3) do {            \
-       struct ia64_fpreg fr[6];                        \
-       ia64_save_scratch_fpregs(fr);                   \
-       iprv = ia64_pal_call_stacked(a0, a1, a2, a3);   \
-       ia64_load_scratch_fpregs(fr);                   \
-} while (0)
-
-#define PAL_CALL_PHYS(iprv,a0,a1,a2,a3) do {                   \
-       struct ia64_fpreg fr[6];                                \
-       ia64_save_scratch_fpregs(fr);                           \
-       iprv = ia64_pal_call_phys_static(a0, a1, a2, a3);       \
-       ia64_load_scratch_fpregs(fr);                           \
-} while (0)
-
-#define PAL_CALL_PHYS_STK(iprv,a0,a1,a2,a3) do {               \
-       struct ia64_fpreg fr[6];                                \
-       ia64_save_scratch_fpregs(fr);                           \
-       iprv = ia64_pal_call_phys_stacked(a0, a1, a2, a3);      \
-       ia64_load_scratch_fpregs(fr);                           \
-} while (0)
-
-typedef int (*ia64_pal_handler) (u64, ...);
-extern ia64_pal_handler ia64_pal;
-extern void ia64_pal_handler_init (void *);
-
-extern ia64_pal_handler ia64_pal;
-
-extern pal_cache_config_info_t         l0d_cache_config_info;
-extern pal_cache_config_info_t         l0i_cache_config_info;
-extern pal_cache_config_info_t         l1_cache_config_info;
-extern pal_cache_config_info_t         l2_cache_config_info;
-
-extern pal_cache_protection_info_t     l0d_cache_protection_info;
-extern pal_cache_protection_info_t     l0i_cache_protection_info;
-extern pal_cache_protection_info_t     l1_cache_protection_info;
-extern pal_cache_protection_info_t     l2_cache_protection_info;
-
-extern pal_cache_config_info_t         pal_cache_config_info_get(pal_cache_level_t,
-                                                                 pal_cache_type_t);
-
-extern pal_cache_protection_info_t     pal_cache_protection_info_get(pal_cache_level_t,
-                                                                     pal_cache_type_t);
-
-
-extern void                            pal_error(int);
-
-
-/* Useful wrappers for the current list of pal procedures */
-
-typedef union pal_bus_features_u {
-       u64     pal_bus_features_val;
-       struct {
-               u64     pbf_reserved1                           :       29;
-               u64     pbf_req_bus_parking                     :       1;
-               u64     pbf_bus_lock_mask                       :       1;
-               u64     pbf_enable_half_xfer_rate               :       1;
-               u64     pbf_reserved2                           :       22;
-               u64     pbf_disable_xaction_queueing            :       1;
-               u64     pbf_disable_resp_err_check              :       1;
-               u64     pbf_disable_berr_check                  :       1;
-               u64     pbf_disable_bus_req_internal_err_signal :       1;
-               u64     pbf_disable_bus_req_berr_signal         :       1;
-               u64     pbf_disable_bus_init_event_check        :       1;
-               u64     pbf_disable_bus_init_event_signal       :       1;
-               u64     pbf_disable_bus_addr_err_check          :       1;
-               u64     pbf_disable_bus_addr_err_signal         :       1;
-               u64     pbf_disable_bus_data_err_check          :       1;
-       } pal_bus_features_s;
-} pal_bus_features_u_t;
-
-extern void pal_bus_features_print (u64);
-
-/* Provide information about configurable processor bus features */
-static inline s64
-ia64_pal_bus_get_features (pal_bus_features_u_t *features_avail,
-                          pal_bus_features_u_t *features_status,
-                          pal_bus_features_u_t *features_control)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_PHYS(iprv, PAL_BUS_GET_FEATURES, 0, 0, 0);
-       if (features_avail)
-               features_avail->pal_bus_features_val = iprv.v0;
-       if (features_status)
-               features_status->pal_bus_features_val = iprv.v1;
-       if (features_control)
-               features_control->pal_bus_features_val = iprv.v2;
-       return iprv.status;
-}
-
-/* Enables/disables specific processor bus features */
-static inline s64
-ia64_pal_bus_set_features (pal_bus_features_u_t feature_select)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_PHYS(iprv, PAL_BUS_SET_FEATURES, feature_select.pal_bus_features_val, 0, 0);
-       return iprv.status;
-}
-
-/* Get detailed cache information */
-static inline s64
-ia64_pal_cache_config_info (u64 cache_level, u64 cache_type, pal_cache_config_info_t *conf)
-{
-       struct ia64_pal_retval iprv;
-
-       PAL_CALL(iprv, PAL_CACHE_INFO, cache_level, cache_type, 0);
-
-       if (iprv.status == 0) {
-               conf->pcci_status                 = iprv.status;
-               conf->pcci_info_1.pcci1_data      = iprv.v0;
-               conf->pcci_info_2.pcci2_data      = iprv.v1;
-               conf->pcci_reserved               = iprv.v2;
-       }
-       return iprv.status;
-
-}
-
-/* Get detailed cche protection information */
-static inline s64
-ia64_pal_cache_prot_info (u64 cache_level, u64 cache_type, pal_cache_protection_info_t *prot)
-{
-       struct ia64_pal_retval iprv;
-
-       PAL_CALL(iprv, PAL_CACHE_PROT_INFO, cache_level, cache_type, 0);
-
-       if (iprv.status == 0) {
-               prot->pcpi_status           = iprv.status;
-               prot->pcp_info[0].pcpi_data = iprv.v0 & 0xffffffff;
-               prot->pcp_info[1].pcpi_data = iprv.v0 >> 32;
-               prot->pcp_info[2].pcpi_data = iprv.v1 & 0xffffffff;
-               prot->pcp_info[3].pcpi_data = iprv.v1 >> 32;
-               prot->pcp_info[4].pcpi_data = iprv.v2 & 0xffffffff;
-               prot->pcp_info[5].pcpi_data = iprv.v2 >> 32;
-       }
-       return iprv.status;
-}
-
-/*
- * Flush the processor instruction or data caches.  *PROGRESS must be
- * initialized to zero before calling this for the first time..
- */
-static inline s64
-ia64_pal_cache_flush (u64 cache_type, u64 invalidate, u64 *progress, u64 *vector)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_IC_OFF(iprv, PAL_CACHE_FLUSH, cache_type, invalidate, *progress);
-       if (vector)
-               *vector = iprv.v0;
-       *progress = iprv.v1;
-       return iprv.status;
-}
-
-
-/* Initialize the processor controlled caches */
-static inline s64
-ia64_pal_cache_init (u64 level, u64 cache_type, u64 rest)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_CACHE_INIT, level, cache_type, rest);
-       return iprv.status;
-}
-
-/* Initialize the tags and data of a data or unified cache line of
- * processor controlled cache to known values without the availability
- * of backing memory.
- */
-static inline s64
-ia64_pal_cache_line_init (u64 physical_addr, u64 data_value)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_CACHE_LINE_INIT, physical_addr, data_value, 0);
-       return iprv.status;
-}
-
-
-/* Read the data and tag of a processor controlled cache line for diags */
-static inline s64
-ia64_pal_cache_read (pal_cache_line_id_u_t line_id, u64 physical_addr)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_CACHE_READ, line_id.pclid_data, physical_addr, 0);
-       return iprv.status;
-}
-
-/* Return summary information about the heirarchy of caches controlled by the processor */
-static inline s64
-ia64_pal_cache_summary (u64 *cache_levels, u64 *unique_caches)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_CACHE_SUMMARY, 0, 0, 0);
-       if (cache_levels)
-               *cache_levels = iprv.v0;
-       if (unique_caches)
-               *unique_caches = iprv.v1;
-       return iprv.status;
-}
-
-/* Write the data and tag of a processor-controlled cache line for diags */
-static inline s64
-ia64_pal_cache_write (pal_cache_line_id_u_t line_id, u64 physical_addr, u64 data)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_CACHE_WRITE, line_id.pclid_data, physical_addr, data);
-       return iprv.status;
-}
-
-
-/* Return the parameters needed to copy relocatable PAL procedures from ROM to memory */
-static inline s64
-ia64_pal_copy_info (u64 copy_type, u64 num_procs, u64 num_iopics,
-                   u64 *buffer_size, u64 *buffer_align)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_COPY_INFO, copy_type, num_procs, num_iopics);
-       if (buffer_size)
-               *buffer_size = iprv.v0;
-       if (buffer_align)
-               *buffer_align = iprv.v1;
-       return iprv.status;
-}
-
-/* Copy relocatable PAL procedures from ROM to memory */
-static inline s64
-ia64_pal_copy_pal (u64 target_addr, u64 alloc_size, u64 processor, u64 *pal_proc_offset)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_COPY_PAL, target_addr, alloc_size, processor);
-       if (pal_proc_offset)
-               *pal_proc_offset = iprv.v0;
-       return iprv.status;
-}
-
-/* Return the number of instruction and data debug register pairs */
-static inline s64
-ia64_pal_debug_info (u64 *inst_regs,  u64 *data_regs)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_DEBUG_INFO, 0, 0, 0);
-       if (inst_regs)
-               *inst_regs = iprv.v0;
-       if (data_regs)
-               *data_regs = iprv.v1;
-
-       return iprv.status;
-}
-
-#ifdef TBD
-/* Switch from IA64-system environment to IA-32 system environment */
-static inline s64
-ia64_pal_enter_ia32_env (ia32_env1, ia32_env2, ia32_env3)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_ENTER_IA_32_ENV, ia32_env1, ia32_env2, ia32_env3);
-       return iprv.status;
-}
-#endif
-
-/* Get unique geographical address of this processor on its bus */
-static inline s64
-ia64_pal_fixed_addr (u64 *global_unique_addr)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_FIXED_ADDR, 0, 0, 0);
-       if (global_unique_addr)
-               *global_unique_addr = iprv.v0;
-       return iprv.status;
-}
-
-/* Get base frequency of the platform if generated by the processor */
-static inline s64
-ia64_pal_freq_base (u64 *platform_base_freq)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_FREQ_BASE, 0, 0, 0);
-       if (platform_base_freq)
-               *platform_base_freq = iprv.v0;
-       return iprv.status;
-}
-
-/*
- * Get the ratios for processor frequency, bus frequency and interval timer to
- * to base frequency of the platform
- */
-static inline s64
-ia64_pal_freq_ratios (struct pal_freq_ratio *proc_ratio, struct pal_freq_ratio *bus_ratio,
-                     struct pal_freq_ratio *itc_ratio)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_FREQ_RATIOS, 0, 0, 0);
-       if (proc_ratio)
-               *(u64 *)proc_ratio = iprv.v0;
-       if (bus_ratio)
-               *(u64 *)bus_ratio = iprv.v1;
-       if (itc_ratio)
-               *(u64 *)itc_ratio = iprv.v2;
-       return iprv.status;
-}
-
-/* Make the processor enter HALT or one of the implementation dependent low
- * power states where prefetching and execution are suspended and cache and
- * TLB coherency is not maintained.
- */
-static inline s64
-ia64_pal_halt (u64 halt_state)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_HALT, halt_state, 0, 0);
-       return iprv.status;
-}
-
-typedef union pal_power_mgmt_info_u {
-       u64                     ppmi_data;
-       struct {
-              u64              exit_latency            : 16,
-                               entry_latency           : 16,
-                               power_consumption       : 28,
-                               im                      : 1,
-                               co                      : 1,
-                               reserved                : 2;
-       } pal_power_mgmt_info_s;
-} pal_power_mgmt_info_u_t;
-
-/* Return information about processor's optional power management capabilities. */
-static inline s64
-ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_STK(iprv, PAL_HALT_INFO, (unsigned long) power_buf, 0, 0);
-       return iprv.status;
-}
-
-/* Cause the processor to enter LIGHT HALT state, where prefetching and execution are
- * suspended, but cache and TLB coherency is maintained.
- */
-static inline s64
-ia64_pal_halt_light (void)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_HALT_LIGHT, 0, 0, 0);
-       return iprv.status;
-}
-
-/* Clear all the processor error logging   registers and reset the indicator that allows
- * the error logging registers to be written. This procedure also checks the pending
- * machine check bit and pending INIT bit and reports their states.
- */
-static inline s64
-ia64_pal_mc_clear_log (u64 *pending_vector)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_CLEAR_LOG, 0, 0, 0);
-       if (pending_vector)
-               *pending_vector = iprv.v0;
-       return iprv.status;
-}
-
-/* Ensure that all outstanding transactions in a processor are completed or that any
- * MCA due to thes outstanding transaction is taken.
- */
-static inline s64
-ia64_pal_mc_drain (void)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_DRAIN, 0, 0, 0);
-       return iprv.status;
-}
-
-/* Return the machine check dynamic processor state */
-static inline s64
-ia64_pal_mc_dynamic_state (u64 offset, u64 *size, u64 *pds)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_DYNAMIC_STATE, offset, 0, 0);
-       if (size)
-               *size = iprv.v0;
-       if (pds)
-               *pds = iprv.v1;
-       return iprv.status;
-}
-
-/* Return processor machine check information */
-static inline s64
-ia64_pal_mc_error_info (u64 info_index, u64 type_index, u64 *size, u64 *error_info)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_ERROR_INFO, info_index, type_index, 0);
-       if (size)
-               *size = iprv.v0;
-       if (error_info)
-               *error_info = iprv.v1;
-       return iprv.status;
-}
-
-/* Inform PALE_CHECK whether a machine check is expected so that PALE_CHECK willnot
- * attempt to correct any expected machine checks.
- */
-static inline s64
-ia64_pal_mc_expected (u64 expected, u64 *previous)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_EXPECTED, expected, 0, 0);
-       if (previous)
-               *previous = iprv.v0;
-       return iprv.status;
-}
-
-/* Register a platform dependent location with PAL to which it can save
- * minimal processor state in the event of a machine check or initialization
- * event.
- */
-static inline s64
-ia64_pal_mc_register_mem (u64 physical_addr)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_REGISTER_MEM, physical_addr, 0, 0);
-       return iprv.status;
-}
-
-/* Restore minimal architectural processor state, set CMC interrupt if necessary
- * and resume execution
- */
-static inline s64
-ia64_pal_mc_resume (u64 set_cmci, u64 save_ptr)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MC_RESUME, set_cmci, save_ptr, 0);
-       return iprv.status;
-}
-
-/* Return the memory attributes implemented by the processor */
-static inline s64
-ia64_pal_mem_attrib (u64 *mem_attrib)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MEM_ATTRIB, 0, 0, 0);
-       if (mem_attrib)
-               *mem_attrib = iprv.v0 & 0xff;
-       return iprv.status;
-}
-
-/* Return the amount of memory needed for second phase of processor
- * self-test and the required alignment of memory.
- */
-static inline s64
-ia64_pal_mem_for_test (u64 *bytes_needed, u64 *alignment)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_MEM_FOR_TEST, 0, 0, 0);
-       if (bytes_needed)
-               *bytes_needed = iprv.v0;
-       if (alignment)
-               *alignment = iprv.v1;
-       return iprv.status;
-}
-
-typedef union pal_perf_mon_info_u {
-       u64                       ppmi_data;
-       struct {
-              u64              generic         : 8,
-                               width           : 8,
-                               cycles          : 8,
-                               retired         : 8,
-                               reserved        : 32;
-       } pal_perf_mon_info_s;
-} pal_perf_mon_info_u_t;
-
-/* Return the performance monitor information about what can be counted
- * and how to configure the monitors to count the desired events.
- */
-static inline s64
-ia64_pal_perf_mon_info (u64 *pm_buffer, pal_perf_mon_info_u_t *pm_info)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_PERF_MON_INFO, (unsigned long) pm_buffer, 0, 0);
-       if (pm_info)
-               pm_info->ppmi_data = iprv.v0;
-       return iprv.status;
-}
-
-/* Specifies the physical address of the processor interrupt block
- * and I/O port space.
- */
-static inline s64
-ia64_pal_platform_addr (u64 type, u64 physical_addr)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_PLATFORM_ADDR, type, physical_addr, 0);
-       return iprv.status;
-}
-
-/* Set the SAL PMI entrypoint in memory */
-static inline s64
-ia64_pal_pmi_entrypoint (u64 sal_pmi_entry_addr)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_PMI_ENTRYPOINT, sal_pmi_entry_addr, 0, 0);
-       return iprv.status;
-}
-
-struct pal_features_s;
-/* Provide information about configurable processor features */
-static inline s64
-ia64_pal_proc_get_features (u64 *features_avail,
-                           u64 *features_status,
-                           u64 *features_control)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_PHYS(iprv, PAL_PROC_GET_FEATURES, 0, 0, 0);
-       if (iprv.status == 0) {
-               *features_avail   = iprv.v0;
-               *features_status  = iprv.v1;
-               *features_control = iprv.v2;
-       }
-       return iprv.status;
-}
-
-/* Enable/disable processor dependent features */
-static inline s64
-ia64_pal_proc_set_features (u64 feature_select)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_PHYS(iprv, PAL_PROC_SET_FEATURES, feature_select, 0, 0);
-       return iprv.status;
-}
-
-/*
- * Put everything in a struct so we avoid the global offset table whenever
- * possible.
- */
-typedef struct ia64_ptce_info_s {
-       u64             base;
-       u32             count[2];
-       u32             stride[2];
-} ia64_ptce_info_t;
-
-/* Return the information required for the architected loop used to purge
- * (initialize) the entire TC
- */
-static inline s64
-ia64_get_ptce (ia64_ptce_info_t *ptce)
-{
-       struct ia64_pal_retval iprv;
-
-       if (!ptce)
-               return -1;
-
-       PAL_CALL(iprv, PAL_PTCE_INFO, 0, 0, 0);
-       if (iprv.status == 0) {
-               ptce->base = iprv.v0;
-               ptce->count[0] = iprv.v1 >> 32;
-               ptce->count[1] = iprv.v1 & 0xffffffff;
-               ptce->stride[0] = iprv.v2 >> 32;
-               ptce->stride[1] = iprv.v2 & 0xffffffff;
-       }
-       return iprv.status;
-}
-
-/* Return info about implemented application and control registers. */
-static inline s64
-ia64_pal_register_info (u64 info_request, u64 *reg_info_1, u64 *reg_info_2)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_REGISTER_INFO, info_request, 0, 0);
-       if (reg_info_1)
-               *reg_info_1 = iprv.v0;
-       if (reg_info_2)
-               *reg_info_2 = iprv.v1;
-       return iprv.status;
-}
-
-typedef union pal_hints_u {
-       u64                     ph_data;
-       struct {
-              u64              si              : 1,
-                               li              : 1,
-                               reserved        : 62;
-       } pal_hints_s;
-} pal_hints_u_t;
-
-/* Return information about the register stack and RSE for this processor
- * implementation.
- */
-static inline s64
-ia64_pal_rse_info (u64 *num_phys_stacked, pal_hints_u_t *hints)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_RSE_INFO, 0, 0, 0);
-       if (num_phys_stacked)
-               *num_phys_stacked = iprv.v0;
-       if (hints)
-               hints->ph_data = iprv.v1;
-       return iprv.status;
-}
-
-/* Cause the processor to enter        SHUTDOWN state, where prefetching and execution are
- * suspended, but cause cache and TLB coherency to be maintained.
- * This is usually called in IA-32 mode.
- */
-static inline s64
-ia64_pal_shutdown (void)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_SHUTDOWN, 0, 0, 0);
-       return iprv.status;
-}
-
-/* Perform the second phase of processor self-test. */
-static inline s64
-ia64_pal_test_proc (u64 test_addr, u64 test_size, u64 attributes, u64 *self_test_state)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_TEST_PROC, test_addr, test_size, attributes);
-       if (self_test_state)
-               *self_test_state = iprv.v0;
-       return iprv.status;
-}
-
-typedef union  pal_version_u {
-       u64     pal_version_val;
-       struct {
-               u64     pv_pal_b_rev            :       8;
-               u64     pv_pal_b_model          :       8;
-               u64     pv_reserved1            :       8;
-               u64     pv_pal_vendor           :       8;
-               u64     pv_pal_a_rev            :       8;
-               u64     pv_pal_a_model          :       8;
-               u64     pv_reserved2            :       16;
-       } pal_version_s;
-} pal_version_u_t;
-
-
-/* Return PAL version information */
-static inline s64
-ia64_pal_version (pal_version_u_t *pal_min_version, pal_version_u_t *pal_cur_version)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_PHYS(iprv, PAL_VERSION, 0, 0, 0);
-       if (pal_min_version)
-               pal_min_version->pal_version_val = iprv.v0;
-
-       if (pal_cur_version)
-               pal_cur_version->pal_version_val = iprv.v1;
-
-       return iprv.status;
-}
-
-typedef union pal_tc_info_u {
-       u64                     pti_val;
-       struct {
-              u64              num_sets        :       8,
-                               associativity   :       8,
-                               num_entries     :       16,
-                               pf              :       1,
-                               unified         :       1,
-                               reduce_tr       :       1,
-                               reserved        :       29;
-       } pal_tc_info_s;
-} pal_tc_info_u_t;
-
-#define tc_reduce_tr           pal_tc_info_s.reduce_tr
-#define tc_unified             pal_tc_info_s.unified
-#define tc_pf                  pal_tc_info_s.pf
-#define tc_num_entries         pal_tc_info_s.num_entries
-#define tc_associativity       pal_tc_info_s.associativity
-#define tc_num_sets            pal_tc_info_s.num_sets
-
-
-/* Return information about the virtual memory characteristics of the processor
- * implementation.
- */
-static inline s64
-ia64_pal_vm_info (u64 tc_level, u64 tc_type,  pal_tc_info_u_t *tc_info, u64 *tc_pages)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_VM_INFO, tc_level, tc_type, 0);
-       if (tc_info)
-               tc_info->pti_val = iprv.v0;
-       if (tc_pages)
-               *tc_pages = iprv.v1;
-       return iprv.status;
-}
-
-/* Get page size information about the virtual memory characteristics of the processor
- * implementation.
- */
-static inline s64
-ia64_pal_vm_page_size (u64 *tr_pages, u64 *vw_pages)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_VM_PAGE_SIZE, 0, 0, 0);
-       if (tr_pages)
-               *tr_pages = iprv.v0;
-       if (vw_pages)
-               *vw_pages = iprv.v1;
-       return iprv.status;
-}
-
-typedef union pal_vm_info_1_u {
-       u64                     pvi1_val;
-       struct {
-               u64             vw              : 1,
-                               phys_add_size   : 7,
-                               key_size        : 8,
-                               max_pkr         : 8,
-                               hash_tag_id     : 8,
-                               max_dtr_entry   : 8,
-                               max_itr_entry   : 8,
-                               max_unique_tcs  : 8,
-                               num_tc_levels   : 8;
-       } pal_vm_info_1_s;
-} pal_vm_info_1_u_t;
-
-typedef union pal_vm_info_2_u {
-       u64                     pvi2_val;
-       struct {
-               u64             impl_va_msb     : 8,
-                               rid_size        : 8,
-                               reserved        : 48;
-       } pal_vm_info_2_s;
-} pal_vm_info_2_u_t;
-
-/* Get summary information about the virtual memory characteristics of the processor
- * implementation.
- */
-static inline s64
-ia64_pal_vm_summary (pal_vm_info_1_u_t *vm_info_1, pal_vm_info_2_u_t *vm_info_2)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_VM_SUMMARY, 0, 0, 0);
-       if (vm_info_1)
-               vm_info_1->pvi1_val = iprv.v0;
-       if (vm_info_2)
-               vm_info_2->pvi2_val = iprv.v1;
-       return iprv.status;
-}
-
-typedef union pal_itr_valid_u {
-       u64                     piv_val;
-       struct {
-              u64              access_rights_valid     : 1,
-                               priv_level_valid        : 1,
-                               dirty_bit_valid         : 1,
-                               mem_attr_valid          : 1,
-                               reserved                : 60;
-       } pal_tr_valid_s;
-} pal_tr_valid_u_t;
-
-/* Read a translation register */
-static inline s64
-ia64_pal_tr_read (u64 reg_num, u64 tr_type, u64 *tr_buffer, pal_tr_valid_u_t *tr_valid)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_PHYS_STK(iprv, PAL_VM_TR_READ, reg_num, tr_type,(u64)ia64_tpa(tr_buffer));
-       if (tr_valid)
-               tr_valid->piv_val = iprv.v0;
-       return iprv.status;
-}
-
-/*
- * PAL_PREFETCH_VISIBILITY transaction types
- */
-#define PAL_VISIBILITY_VIRTUAL         0
-#define PAL_VISIBILITY_PHYSICAL                1
-
-/*
- * PAL_PREFETCH_VISIBILITY return codes
- */
-#define PAL_VISIBILITY_OK              1
-#define PAL_VISIBILITY_OK_REMOTE_NEEDED        0
-#define PAL_VISIBILITY_INVAL_ARG       -2
-#define PAL_VISIBILITY_ERROR           -3
-
-static inline s64
-ia64_pal_prefetch_visibility (s64 trans_type)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_PREFETCH_VISIBILITY, trans_type, 0, 0);
-       return iprv.status;
-}
-
-#ifdef CONFIG_VTI
-#include <asm/vmx_pal.h>
-#endif // CONFIG_VTI
-#endif /* __ASSEMBLY__ */
-
-#endif /* _ASM_IA64_PAL_H */
diff --git a/xen/include/asm-ia64/ptrace.h b/xen/include/asm-ia64/ptrace.h
deleted file mode 100644 (file)
index d448787..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-#ifndef _ASM_IA64_PTRACE_H
-#define _ASM_IA64_PTRACE_H
-
-/*
- * Copyright (C) 1998-2004 Hewlett-Packard Co
- *     David Mosberger-Tang <davidm@hpl.hp.com>
- *     Stephane Eranian <eranian@hpl.hp.com>
- * Copyright (C) 2003 Intel Co
- *     Suresh Siddha <suresh.b.siddha@intel.com>
- *     Fenghua Yu <fenghua.yu@intel.com>
- *     Arun Sharma <arun.sharma@intel.com>
- *
- * 12/07/98    S. Eranian      added pt_regs & switch_stack
- * 12/21/98    D. Mosberger    updated to match latest code
- *  6/17/99    D. Mosberger    added second unat member to "struct switch_stack"
- *
- */
-/*
- * When a user process is blocked, its state looks as follows:
- *
- *            +----------------------+ ------- IA64_STK_OFFSET
- *                   |                      |   ^
- *            | struct pt_regs       |  |
- *           |                      |   |
- *            +----------------------+  |
- *           |                      |   |
- *                   |    memory stack      |   |
- *           | (growing downwards)  |   |
- *           //.....................//  |
- *                                      |
- *           //.....................//  |
- *           |                      |   |
- *            +----------------------+  |
- *            | struct switch_stack  |  |
- *           |                      |   |
- *           +----------------------+   |
- *           |                      |   |
- *           //.....................//  |
- *                                      |
- *           //.....................//  |
- *           |                      |   |
- *           |  register stack      |   |
- *           | (growing upwards)    |   |
- *            |                             |   |
- *           +----------------------+   |  --- IA64_RBS_OFFSET
- *            |  struct thread_info  |  |  ^
- *           +----------------------+   |  |
- *           |                      |   |  |
- *            |  struct task_struct  |  |  |
- * current -> |                             |   |  |
- *           +----------------------+ -------
- *
- * Note that ar.ec is not saved explicitly in pt_reg or switch_stack.
- * This is because ar.ec is saved as part of ar.pfs.
- */
-
-#include <linux/config.h>
-
-#include <asm/fpu.h>
-#include <asm/offsets.h>
-
-/*
- * Base-2 logarithm of number of pages to allocate per task structure
- * (including register backing store and memory stack):
- */
-#if defined(CONFIG_IA64_PAGE_SIZE_4KB)
-# define KERNEL_STACK_SIZE_ORDER               3
-#elif defined(CONFIG_IA64_PAGE_SIZE_8KB)
-# define KERNEL_STACK_SIZE_ORDER               2
-#elif defined(CONFIG_IA64_PAGE_SIZE_16KB)
-# define KERNEL_STACK_SIZE_ORDER               1
-#else
-# define KERNEL_STACK_SIZE_ORDER               0
-#endif
-
-#define IA64_RBS_OFFSET                        ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 15) & ~15)
-#define IA64_STK_OFFSET                        ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE)
-
-#define KERNEL_STACK_SIZE              IA64_STK_OFFSET
-
-#ifndef __ASSEMBLY__
-
-#include <asm/current.h>
-#include <asm/page.h>
-
-/*
- * This struct defines the way the registers are saved on system
- * calls.
- *
- * We don't save all floating point register because the kernel
- * is compiled to use only a very small subset, so the other are
- * untouched.
- *
- * THIS STRUCTURE MUST BE A MULTIPLE 16-BYTE IN SIZE
- * (because the memory stack pointer MUST ALWAYS be aligned this way)
- *
- */
-#ifdef CONFIG_VTI
-#include "vmx_ptrace.h"
-#else  //CONFIG_VTI
-struct pt_regs {
-       /* The following registers are saved by SAVE_MIN: */
-       unsigned long b6;               /* scratch */
-       unsigned long b7;               /* scratch */
-
-       unsigned long ar_csd;           /* used by cmp8xchg16 (scratch) */
-       unsigned long ar_ssd;           /* reserved for future use (scratch) */
-
-       unsigned long r8;               /* scratch (return value register 0) */
-       unsigned long r9;               /* scratch (return value register 1) */
-       unsigned long r10;              /* scratch (return value register 2) */
-       unsigned long r11;              /* scratch (return value register 3) */
-
-       unsigned long cr_ipsr;          /* interrupted task's psr */
-       unsigned long cr_iip;           /* interrupted task's instruction pointer */
-       /*
-        * interrupted task's function state; if bit 63 is cleared, it
-        * contains syscall's ar.pfs.pfm:
-        */
-       unsigned long cr_ifs;
-
-       unsigned long ar_unat;          /* interrupted task's NaT register (preserved) */
-       unsigned long ar_pfs;           /* prev function state  */
-       unsigned long ar_rsc;           /* RSE configuration */
-       /* The following two are valid only if cr_ipsr.cpl > 0: */
-       unsigned long ar_rnat;          /* RSE NaT */
-       unsigned long ar_bspstore;      /* RSE bspstore */
-
-       unsigned long pr;               /* 64 predicate registers (1 bit each) */
-       unsigned long b0;               /* return pointer (bp) */
-       unsigned long loadrs;           /* size of dirty partition << 16 */
-
-       unsigned long r1;               /* the gp pointer */
-       unsigned long r12;              /* interrupted task's memory stack pointer */
-       unsigned long r13;              /* thread pointer */
-
-       unsigned long ar_fpsr;          /* floating point status (preserved) */
-       unsigned long r15;              /* scratch */
-
-       /* The remaining registers are NOT saved for system calls.  */
-
-       unsigned long r14;              /* scratch */
-       unsigned long r2;               /* scratch */
-       unsigned long r3;               /* scratch */
-
-       /* The following registers are saved by SAVE_REST: */
-       unsigned long r16;              /* scratch */
-       unsigned long r17;              /* scratch */
-       unsigned long r18;              /* scratch */
-       unsigned long r19;              /* scratch */
-       unsigned long r20;              /* scratch */
-       unsigned long r21;              /* scratch */
-       unsigned long r22;              /* scratch */
-       unsigned long r23;              /* scratch */
-       unsigned long r24;              /* scratch */
-       unsigned long r25;              /* scratch */
-       unsigned long r26;              /* scratch */
-       unsigned long r27;              /* scratch */
-       unsigned long r28;              /* scratch */
-       unsigned long r29;              /* scratch */
-       unsigned long r30;              /* scratch */
-       unsigned long r31;              /* scratch */
-
-       unsigned long ar_ccv;           /* compare/exchange value (scratch) */
-
-       /*
-        * Floating point registers that the kernel considers scratch:
-        */
-       struct ia64_fpreg f6;           /* scratch */
-       struct ia64_fpreg f7;           /* scratch */
-       struct ia64_fpreg f8;           /* scratch */
-       struct ia64_fpreg f9;           /* scratch */
-       struct ia64_fpreg f10;          /* scratch */
-       struct ia64_fpreg f11;          /* scratch */
-};
-#endif // CONFIG_VTI
-
-/*
- * This structure contains the addition registers that need to
- * preserved across a context switch.  This generally consists of
- * "preserved" registers.
- */
-struct switch_stack {
-       unsigned long caller_unat;      /* user NaT collection register (preserved) */
-       unsigned long ar_fpsr;          /* floating-point status register */
-
-       struct ia64_fpreg f2;           /* preserved */
-       struct ia64_fpreg f3;           /* preserved */
-       struct ia64_fpreg f4;           /* preserved */
-       struct ia64_fpreg f5;           /* preserved */
-
-       struct ia64_fpreg f12;          /* scratch, but untouched by kernel */
-       struct ia64_fpreg f13;          /* scratch, but untouched by kernel */
-       struct ia64_fpreg f14;          /* scratch, but untouched by kernel */
-       struct ia64_fpreg f15;          /* scratch, but untouched by kernel */
-       struct ia64_fpreg f16;          /* preserved */
-       struct ia64_fpreg f17;          /* preserved */
-       struct ia64_fpreg f18;          /* preserved */
-       struct ia64_fpreg f19;          /* preserved */
-       struct ia64_fpreg f20;          /* preserved */
-       struct ia64_fpreg f21;          /* preserved */
-       struct ia64_fpreg f22;          /* preserved */
-       struct ia64_fpreg f23;          /* preserved */
-       struct ia64_fpreg f24;          /* preserved */
-       struct ia64_fpreg f25;          /* preserved */
-       struct ia64_fpreg f26;          /* preserved */
-       struct ia64_fpreg f27;          /* preserved */
-       struct ia64_fpreg f28;          /* preserved */
-       struct ia64_fpreg f29;          /* preserved */
-       struct ia64_fpreg f30;          /* preserved */
-       struct ia64_fpreg f31;          /* preserved */
-
-       unsigned long r4;               /* preserved */
-       unsigned long r5;               /* preserved */
-       unsigned long r6;               /* preserved */
-       unsigned long r7;               /* preserved */
-
-       unsigned long b0;               /* so we can force a direct return in copy_thread */
-       unsigned long b1;
-       unsigned long b2;
-       unsigned long b3;
-       unsigned long b4;
-       unsigned long b5;
-
-       unsigned long ar_pfs;           /* previous function state */
-       unsigned long ar_lc;            /* loop counter (preserved) */
-       unsigned long ar_unat;          /* NaT bits for r4-r7 */
-       unsigned long ar_rnat;          /* RSE NaT collection register */
-       unsigned long ar_bspstore;      /* RSE dirty base (preserved) */
-       unsigned long pr;               /* 64 predicate registers (1 bit each) */
-};
-
-#ifdef __KERNEL__
-/*
- * We use the ia64_psr(regs)->ri to determine which of the three
- * instructions in bundle (16 bytes) took the sample. Generate
- * the canonical representation by adding to instruction pointer.
- */
-# define instruction_pointer(regs) ((regs)->cr_iip + ia64_psr(regs)->ri)
-/* Conserve space in histogram by encoding slot bits in address
- * bits 2 and 3 rather than bits 0 and 1.
- */
-#define profile_pc(regs)                                               \
-({                                                                     \
-       unsigned long __ip = instruction_pointer(regs);                 \
-       (__ip & ~3UL) + ((__ip & 3UL) << 2);                            \
-})
-
-  /* given a pointer to a task_struct, return the user's pt_regs */
-# define ia64_task_regs(t)             (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
-# define ia64_psr(regs)                        ((struct ia64_psr *) &(regs)->cr_ipsr)
-# define user_mode(regs)               (((struct ia64_psr *) &(regs)->cr_ipsr)->cpl != 0)
-# define user_stack(task,regs) ((long) regs - (long) task == IA64_STK_OFFSET - sizeof(*regs))
-# define fsys_mode(task,regs)                                  \
-  ({                                                           \
-         struct task_struct *_task = (task);                   \
-         struct pt_regs *_regs = (regs);                       \
-         !user_mode(_regs) && user_stack(_task, _regs);        \
-  })
-
-  /*
-   * System call handlers that, upon successful completion, need to return a negative value
-   * should call force_successful_syscall_return() right before returning.  On architectures
-   * where the syscall convention provides for a separate error flag (e.g., alpha, ia64,
-   * ppc{,64}, sparc{,64}, possibly others), this macro can be used to ensure that the error
-   * flag will not get set.  On architectures which do not support a separate error flag,
-   * the macro is a no-op and the spurious error condition needs to be filtered out by some
-   * other means (e.g., in user-level, by passing an extra argument to the syscall handler,
-   * or something along those lines).
-   *
-   * On ia64, we can clear the user's pt_regs->r8 to force a successful syscall.
-   */
-# define force_successful_syscall_return()     (ia64_task_regs(current)->r8 = 0)
-
-  struct task_struct;                  /* forward decl */
-  struct unw_frame_info;               /* forward decl */
-
-  extern void show_regs (struct pt_regs *);
-  extern void ia64_do_show_stack (struct unw_frame_info *, void *);
-  extern unsigned long ia64_get_user_rbs_end (struct task_struct *, struct pt_regs *,
-                                             unsigned long *);
-  extern long ia64_peek (struct task_struct *, struct switch_stack *, unsigned long,
-                        unsigned long, long *);
-  extern long ia64_poke (struct task_struct *, struct switch_stack *, unsigned long,
-                        unsigned long, long);
-  extern void ia64_flush_fph (struct task_struct *);
-  extern void ia64_sync_fph (struct task_struct *);
-  extern long ia64_sync_user_rbs (struct task_struct *, struct switch_stack *,
-                                 unsigned long, unsigned long);
-
-  /* get nat bits for scratch registers such that bit N==1 iff scratch register rN is a NaT */
-  extern unsigned long ia64_get_scratch_nat_bits (struct pt_regs *pt, unsigned long scratch_unat);
-  /* put nat bits for scratch registers such that scratch register rN is a NaT iff bit N==1 */
-  extern unsigned long ia64_put_scratch_nat_bits (struct pt_regs *pt, unsigned long nat);
-
-  extern void ia64_increment_ip (struct pt_regs *pt);
-  extern void ia64_decrement_ip (struct pt_regs *pt);
-
-#endif /* !__KERNEL__ */
-
-/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */
-struct pt_all_user_regs {
-       unsigned long nat;
-       unsigned long cr_iip;
-       unsigned long cfm;
-       unsigned long cr_ipsr;
-       unsigned long pr;
-
-       unsigned long gr[32];
-       unsigned long br[8];
-       unsigned long ar[128];
-       struct ia64_fpreg fr[128];
-};
-
-#endif /* !__ASSEMBLY__ */
-
-/* indices to application-registers array in pt_all_user_regs */
-#define PT_AUR_RSC     16
-#define PT_AUR_BSP     17
-#define PT_AUR_BSPSTORE        18
-#define PT_AUR_RNAT    19
-#define PT_AUR_CCV     32
-#define PT_AUR_UNAT    36
-#define PT_AUR_FPSR    40
-#define PT_AUR_PFS     64
-#define PT_AUR_LC      65
-#define PT_AUR_EC      66
-
-/*
- * The numbers chosen here are somewhat arbitrary but absolutely MUST
- * not overlap with any of the number assigned in <linux/ptrace.h>.
- */
-#define PTRACE_SINGLEBLOCK     12      /* resume execution until next branch */
-#define PTRACE_OLD_GETSIGINFO  13      /* (replaced by PTRACE_GETSIGINFO in <linux/ptrace.h>)  */
-#define PTRACE_OLD_SETSIGINFO  14      /* (replaced by PTRACE_SETSIGINFO in <linux/ptrace.h>)  */
-#define PTRACE_GETREGS         18      /* get all registers (pt_all_user_regs) in one shot */
-#define PTRACE_SETREGS         19      /* set all registers (pt_all_user_regs) in one shot */
-
-#define PTRACE_OLDSETOPTIONS   21
-
-#endif /* _ASM_IA64_PTRACE_H */